mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
The C# 10 grammar only allows attributes on a lambda or its parameters when the parameter list is parenthesized, but LambdaNeedsParenthesis predates attribute support and only considered the single parameter's type and modifiers. An attributed lambda whose parameter type is erased for being anonymous therefore printed as '[My] a => a.X', which does not parse. Latent since attributed-lambda decompilation was added: every other attributed lambda has explicitly typed parameters, which already force the parenthesized form. Assisted-by: Claude:claude-fable-5:Claude Codefix/lambda-parameter-syntax
2 changed files with 19 additions and 0 deletions
Loading…
Reference in new issue