Report semantic errors in lambdas
The compiler does not generate semantic errors inside lambdas in the presence of syntactic errors causing several features to not work in lambdas with syntax errors. The bug for this ([1867](https://github.com/dotnet/roslyn/issues/1867)) was moved to milestone 1.1 so we are going to use an analyzer in the interim for 1.0. 1. We now check for IncompleteMemberSyntax nodes and LambdaExpressionSyntax nodes which contain syntax diagnostics on any of their descendant nodes. 2. We report both unbound identifier names and constructors that the compiler reports as binding, but which fail overload resolution (actually don't exist). Performance considerations should be mitigated by only doing these checks only lambdas with syntax errors. Other notes: - Renamed analyzer to UnboundIdentifier instead of AddImport since it is being used in more places than just the AddImport fixer - Updated the DiagnosticDescriptor for this analyzer to take localizeable strings. Fixes #1744 Fixes #1241 Fixes #1239
Showing
想要评论请 注册 或 登录