The C# compiler was not using the correct syntax node to verify whether or not...
The C# compiler was not using the correct syntax node to verify whether or not the expression body of an expression-bodied lambda or member was classified as a statement expression. This caused code to unexpectedly succeed to compile in certain cases (e.g. when the expression body was a parenthesized-expression that wrapped a valid statement expression), which broke conversions to void-returning delegates (and thus overload resolution, as in the original repro). This change adjusts the check to use the correct syntax node. ***NO_CI*** (changeset 1406995)
Showing
想要评论请 注册 或 登录