dotnet/roslyn

Parse await expression in VB when method is not async

Open

#10.320 aperta il 4 apr 2016

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-VBhelp wanted

Metriche repository

Star
 (20.414 star)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

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.

Guida contributor