dotnet/roslyn

Parse await expression in VB when method is not async

Open

#10.320 aberto em 4 de abr. de 2016

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)C# (4.257 forks)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-VBhelp wanted

Métricas do repositório

Stars
 (20.414 stars)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (256 fundiu PRs em 30d)

Description

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.

Guia do colaborador