Siegfried Pammer
b85d1ba65a
Fix #2771 : Allow MetadataTypeDefinition.DefaultMemberName to return null if DefaultMemberAttribute is not present.
3 years ago
Siegfried Pammer
b9f2fc4f96
Fix #2781 : Fix missing nullability annotation on base type
3 years ago
Siegfried Pammer
ed02b2eb9e
Add MemberNotNullWhenAttribute to IMethod, IProperty and IEvent. Make sure that it's guaranteed that AccessorOwner is non-null, when IsAccessor is true.
3 years ago
Siegfried Pammer
583f661153
Work on #1204 : Add optimized implementation of HasAttribute and GetAttribute to IEntity.
3 years ago
Siegfried Pammer
2ed9ad6b51
Add support for C# 11 scoped parameter modifier.
3 years ago
Siegfried Pammer
e905160537
Extend definition of ComputeIsRecord to avoid false-positives.
3 years ago
Siegfried Pammer
d248867302
Add support for C# 10 record structs.
3 years ago
Siegfried Pammer
e61f46c474
Add MethodCodeType argument to MethodImplAttribute.
3 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.
3 years ago
James May
4a1f79a32a
Assume conventionally named unresolved method references are properties or events.
...
eg. decompiles to .Property instead of .get_Property()
3 years ago
Siegfried Pammer
ba177459f1
Fix comment.
3 years ago
Siegfried Pammer
a121e7c6ca
Fix #2653 : ILSpy reports wrong visibility for overridden protected internal properties if located in another assembly.
3 years ago
Daniel Grunwald
cc7119e191
Fix #2654 : Ignore custom attributes on parameter where SequenceNumber is out-of-range.
...
This can occur when decoding the signature of a setter-only property, as the setter has an additional `value` parameter that does not appear in the property's signature.
3 years ago
Siegfried Pammer
1887412c46
Add ITypeDefinition.MetadataName
3 years ago
Siegfried Pammer
fe915780ad
Add AssemblyVersion to IModule
3 years ago
Siegfried Pammer
84704a7452
Adds support for C# 9 covariant return types in methods and getter-only properties and indexers.
4 years ago
Daniel Grunwald
5fb2f7a22f
#nullable enable for ILAst (except for generated code)
4 years ago
Daniel Grunwald
bd9aabeae2
Update to dotnet-format 5.1.225507.
...
This makes the formatting expected by our CI consistent with that generated by VS2019.9.
4 years ago
Siegfried Pammer
3f721a17c1
Add support for System.Runtime.CompilerServices.SpecialNameAttribute
4 years ago
Siegfried Pammer
ae3306b966
Fix #2312 : Constructors and operators may not have any generic type parameters in C#
4 years ago
Siegfried Pammer
fdda8abd74
Fix #2282 : Finalizers must be void and cannot be declared in interfaces
4 years ago
Daniel Grunwald
be9871981a
Records: Detect compiler-generated Equals() in derived records.
4 years ago
Daniel Grunwald
4050d39b28
Hide [NullableContext] on accessors
4 years ago
Daniel Grunwald
f869756fed
Use "record" instead of "class" for C# 9 record class types.
5 years ago
Daniel Grunwald
cabb02b5fd
Add support for decoding function pointer types in signatures.
5 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
5 years ago
Siegfried Pammer
62b8ab39f1
Fix oversight from b788441c78
5 years ago
Daniel Grunwald
1751c9922c
Avoid constructing a GetClassTypeReference instance in TypeProvider.GetTypeFromReference.
5 years ago
Daniel Grunwald
b788441c78
DecompilerTypeSystem: If some known types are present in referenced assemblies but others are missing; add the missing known types to the compilation.
...
This ensures that FindType(KnownTypeCode).GetDefinition() always returns a usable definition.
5 years ago
Daniel Grunwald
5bd47c171f
Don't require a definition for the task builder type, also accept an UnknownType.
5 years ago
Daniel Grunwald
d388319cba
Add support for C# 9 init accessors.
5 years ago
Siegfried Pammer
8d72672e6c
Reimplement DecompilerSettings.StaticLocalFunctions (was lost in the refactoring in #2077 )
5 years ago
Siegfried Pammer
18ace00266
Refactor LocalFunctionDeclarationStatement + LocalFunctionMethod
5 years ago
Daniel Grunwald
c9e41d0582
Add support for decoding `NativeIntegerAttribute`.
5 years ago
Daniel Grunwald
0dd75d6852
Add support for slicing using C# 8 ranges.
5 years ago
Daniel Grunwald
12226c5f90
Add support for indexing a container with a System.Index instance.
5 years ago
Daniel Grunwald
5ad7ee0cea
Fix #1629 : Add support for `[module: NullablePublicOnly]`
...
If this attribute is in use, private/internal members lack nullability annotations.
Previously in such cases, we ended up inheriting the nullability from the `[NullableContext]`, which could cause us to display a misleading nullability for primary methods.
In debug builds, it could also trigger an assertion when trying to apply the "nullable reference type" marking to to value types.
Of note is that properties and events are a special case: they do not explicitly store Accessibility in metadata. For properties computing the accessibility requires decoding the signature (to find overridden base properties). So these two only check the declaring type's accessibility instead; private properties may still carry nullability despite `[NullablePublicOnly]`. However, the property accessors won't store nullability, so we need to read the `returnTypeAttributes` from the property itself.
5 years ago
Siegfried Pammer
e2df79ef70
Fix #1975 : readonly modifier is added to structs even if language version is lower than C# 7.0
5 years ago
Daniel Grunwald
3bf9f7c301
Fix #1943 : "ref readonly" returns from properties/indexers
5 years ago
Siegfried Pammer
5be6be97df
Code review:
...
* rename a few identifiers,
* add comments,
* skip all compiler-generated type-arguments in resolve result,
* and change implementation of LocalFunctionMethod.Specialize: wrap specialized method and not the other way round.
5 years ago
Siegfried Pammer
9e89384916
Make NumberOfCompilerGeneratedGenerics immutable and rename to NumberOfCompilerGeneratedTypeParameters
5 years ago
Daniel Grunwald
569b526043
Simplify handling of accessibilities.
6 years ago
SilverFox
f69d0cc5d0
Add support of static local function delegate for roslyn < 16.4
6 years ago
SilverFox
5e6fecebf5
Rework support for generic local function, and fix tests `LocalFunctions.Generic.Test_CaptureT` and `LocalFunctions.Generic.TestGenericArgs`
6 years ago
Siegfried Pammer
e211b01595
Fix CA1507:UseNameofInPlaceOfString, adjust formatting of some older source files copied from NRefactory.
6 years ago
Daniel Grunwald
de33e79384
Add tests for 'async IAsyncEnumerable'.
...
Remove [AsyncIteratorStateMachine] attribute and left-over ldc.i4 instructions.
6 years ago
Daniel Grunwald
5d337aa655
TypeInference: add support for nullability annotated types
6 years ago
Daniel Grunwald
52c249e6d2
Simplify debug output: don't show owner for type parameters
6 years ago
Daniel Grunwald
8f90f3834d
Implement support for C# 8 readonly members.
6 years ago
Daniel Grunwald
ae32913aca
Add IMethod.ThisIsRefReadOnly
6 years ago