mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
Mutating the DefaultValueExpression is enough here; ConvertTo already hands out mutated input nodes elsewhere (UnwrapChild), so building a replacement node and copying the annotations over bought nothing. The operator special case is easy to mistake for a cosmetic preference, because the null literal is accepted in the same position: it converts only to reference and nullable types, so it still narrows operator overload resolution, whereas the default literal converts to everything and C# rejects it outright for every binary operator except == and !=. Assisted-by: Claude:claude-opus-5[1m]:Claude Codepull/4014/head
2 changed files with 9 additions and 7 deletions
Loading…
Reference in new issue