dotnet/roslyn

Parse await expression in VB when method is not async

Open

#10,320 创建于 2016年4月4日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)C# (4,257 fork)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-VBhelp wanted

仓库指标

Star
 (20,414 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

If you use an await expression in VB when the enclosing method is not async, you get an error that you cannot use await in a non-async method, and you also get a syntax error. In most cases we could drop the syntax error and just report the former error message.

We could also check that we bind properly if we relax the parser. See C# issue #10232.

贡献者指南