dotnet/roslyn

Parse await expression in VB when method is not async

開放

#10,320 建立於 2016年4月4日

 (2 則留言) (0 個反應) (0 位負責人)C# (4,257 個分叉)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-VBhelp wanted

倉庫指標

星標
 (20,414 顆星)
PR 合併指標
 (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.

貢獻者指南