Siegfried Pammer
1f4fd68b3f
Make optional AST slots nullable
...
Optional single-child slots return T? with a real null instead of a role
null-object, taking the C# grammar as the oracle for which slots are optional.
The generator emits the property type as T? and matches it with MatchOptional,
and consumers move from .IsNull to is null / ?.. This covers the optional
statement, member, try-catch, creation-initializer and pattern slots and the
optional NameSlot tokens. A few slots the grammar marks required but the
decompiler legitimately leaves empty (the implicit-element-access target, an
implicitly-typed lambda parameter's type) are flipped to nullable as well.
Assisted-by: Claude:claude-opus-4-8:Claude Code
2 weeks ago
Siegfried Pammer
785e36712d
Enable nullable reference types across the C# transforms
...
Turn on #nullable enable across the AST transform pipeline, ahead of
annotating the slot properties themselves. TransformContext now exposes the
nullable CurrentMember/CurrentTypeDefinition/CurrentModule contract already
declared by ITypeResolveContext, and the generated pattern-to-node conversion
returns a non-null node so patterns can be used in collection initializers
without warnings. No IL changes.
Assisted-by: Claude:claude-opus-4-8:Claude Code
2 weeks ago
Siegfried Pammer
978c31ca5e
Add PropertyAndEventBackingFieldLookup to improve performance of MemberIsHidden.
1 year ago
Siegfried Pammer
c478ccc2e0
Fix #3319 : KeyDownEvent field reference was replaced with KeyDown event reference.
2 years ago
Siegfried Pammer
9d22e3ab41
NullableLiftingTransform: Undo new compiler optimization (omitting get_HasValue for comparisions with constants)
2 years ago
ElektroKill
a5febb3e4f
Add support for VB.NET automatic events
4 years ago
Siegfried Pammer
40ffc1e90e
Remove backing fields of auto properties and events.
...
The previous commit started decompiling backing fields because they are still needed prior to the C# transforms.
4 years ago
Siegfried Pammer
f98012ec16
DetectPinnedRegions: Support special case where pinned pointer is unused and the compiler optimized out the StopGCTracking-conversion.
4 years ago
Siegfried Pammer
ee3aabdc51
Fix #2534 : Handle default implementations of properties and events in interfaces.
5 years ago
SilverFox
11b44e53b7
Add support for attributes of field/property in primary ctor of records
5 years ago
Siegfried Pammer
bc5d078feb
Fix #1698 : Readonly auto properties from VB.NET are not properly decompiled
5 years ago
Siegfried Pammer
ce199fad13
Fixed regression around foreach-on-string introduced in 16134e52e4
5 years ago
SilverFox
65ea2e7af6
Fix #2406 : for readonly property with only getter, move readonly to property instead of getter
5 years ago
Siegfried Pammer
16134e52e4
Fix #2395 : Do not use for->foreach transform if collection is not an array.
5 years ago
Siegfried Pammer
aa147870a2
Fix #2389 : missing extern keyword for properties and events.
5 years ago
Siegfried Pammer
afa4db00b6
Fix #2297 : Add an option to disable decompilation of getter-only auto properties.
5 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
6 years ago
Siegfried Pammer
9e0e8d1cbc
Add basic support for C# 8.0 enhanced using statements.
6 years ago
Siegfried Pammer
3535e01482
Fix regex for dotted property names.
6 years ago
Siegfried Pammer
7f9d9002bc
#2104 : Generalize auto property backing field name-checking
6 years ago
Siegfried Pammer
15028b3669
Fix #2104 : Check field name of backing field when attempting to transform to an auto property.
6 years ago
Siegfried Pammer
c9f5e5dd33
Refactor ForeachStatement to support deconstruction
6 years ago
Siegfried Pammer
e22e5423d5
Fix #2098 : Support auto event pattern with reordered arguments.
6 years ago
Siegfried Pammer
407c337168
Add ForStatement, DoWhileStatement and SeparateLocalVariableDeclarations settings.
7 years ago
Daniel Grunwald
703d21bafa
Support C# 7.3 pattern-based fixed statement.
7 years ago
Siegfried Pammer
b836f0b859
Fix #1837 : auto events with tuples are not recognized.
7 years ago
Siegfried Pammer
941906e8db
Fix #1699 : Auto properties without getter are not properly decompiled
...
Also fixes wrong decompilation of auto properties modified by Fody.
7 years ago
Daniel Grunwald
8f90f3834d
Implement support for C# 8 readonly members.
7 years ago
Siegfried Pammer
8d2e8cc267
Fix #1628 : Preserve order of child nodes in PatternStatementTransform.VisitBinaryOperatorExpression.
7 years ago
Siegfried Pammer
13fa499c35
Fix #1630 : Do not convert while to for statement, if any iterator variables are to be declared in the loop body. This causes problems with ref-typed variables.
7 years ago
Daniel Grunwald
b75c252193
Upgrade C# 8.0 nullability support for Roslyn 3.2.0-beta4.
7 years ago
Daniel Grunwald
856cedc95e
#1456 : add test case; add additional checks to ensure we only transform normal locals into using/foreach-locals
7 years ago
Siegfried Pammer
b0cb976357
Fix #1454 : Name collision after converting for-over-array to foreach.
7 years ago
Siegfried Pammer
b18653ba82
Fix #1319 : Property name collides with variable name
8 years ago
Siegfried Pammer
d469edbf2a
Fix initialization order of destructorBodyPattern and destructorPattern.
8 years ago
Siegfried Pammer
2bcafb8c4f
Fix #1247 : Empty destructors are not decompiled correctly
8 years ago
Daniel Grunwald
4ec0028356
Don't cache attributes in the type system.
8 years ago
Siegfried Pammer
028cbe69a4
Fix decompilation of auto properties with explicit implementation
8 years ago
Siegfried Pammer
569434d516
Fix #1162 : decompilation of explicitly implemented events and properties
8 years ago
Siegfried Pammer
0a992d2158
Fix build.
8 years ago
Siegfried Pammer
8f47e8429b
Fix #1157 : Decompilation of abstract events and overridden auto events
8 years ago
Siegfried Pammer
1646be7482
#1145 : Make type arguments optional in mcs auto event pattern.
8 years ago
Siegfried Pammer
e012fe04be
Fix #1146 : C#3+ property accessor generates bad "[field: " tag on the accessor
8 years ago
Siegfried Pammer
ad06a01441
Fix #1117 : NullReferenceException at Transforms.PatternStatementTransform.TransformForeachOnArray
8 years ago
Siegfried Pammer
bb67948844
Fix remaining compile errors after merge.
8 years ago
Siegfried Pammer
69fdc55b41
Add support for C# 7.3 Attributes on backing fields: Allows [field: …] attributes on an auto-implemented property to target its backing field.
8 years ago
Siegfried Pammer
504fe200b6
Fix #1131 : Add a few safety null checks in TransformForeachOnMultiDimArray
8 years ago
Siegfried Pammer
a70f19d536
Partially port transforms
8 years ago
Siegfried Pammer
63ef50fa8c
Fix #1061 : Different control flow in decompiled code
8 years ago
Siegfried Pammer
3892762e70
Fix #1053 : virtual protected base method with 'out', invalid cast-to-base on use.
8 years ago