Daniel Grunwald
3a4db502bc
Add support for arithmetic using C# 9 native integer types.
5 years ago
Daniel Grunwald
2c9b84a1e1
If possible, use nint/nuint for conversions to/from IntPtr.
5 years ago
Daniel Grunwald
c9e41d0582
Add support for decoding `NativeIntegerAttribute`.
5 years ago
Daniel Grunwald
450fae49e3
Introduce nint/nuint types and their conversions in the type system
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
4846feb640
Add support for C# 8 range syntax.
...
This initial commit only handles the trivial case where an Index or Range object is constructed.
The TODO portions of the test case show there are plenty of cases where where the C# compiler emits more complex code patterns that will require ILAst transforms.
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.
6 years ago
Siegfried Pammer
9e89384916
Make NumberOfCompilerGeneratedGenerics immutable and rename to NumberOfCompilerGeneratedTypeParameters
6 years ago
Siegfried Pammer
aef5fc1bce
Fix #1785 : Only use System.MathF, if it is available in the used framework.
6 years ago
Daniel Grunwald
569b526043
Simplify handling of accessibilities.
6 years ago
Siegfried Pammer
8706fe284a
Fix #1818 : Assembly-level TypeForwardedTo not displaying unresolved generics properly
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
Daniel Grunwald
a1c211f326
Fix #1794 : Avoid extra cast to double for ulong -> float conversion
6 years ago
Siegfried Pammer
64b9511aca
#1749 : Represent multi-instruction BlockContainers in expression-context as inlined delegate invocation.
6 years ago
Siegfried Pammer
e211b01595
Fix CA1507:UseNameofInPlaceOfString, adjust formatting of some older source files copied from NRefactory.
6 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.
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
e158ef45c5
Subtituting `T!` with `T=string` where the caller is in null-oblivious code now results in oblivious `string` instead of `string!`.
6 years ago
Siegfried Pammer
c7f98a4db7
Add support for await using statements.
6 years ago
Daniel Grunwald
52c249e6d2
Simplify debug output: don't show owner for type parameters
6 years ago
Daniel Grunwald
6a04a33c4f
Add IAsyncEnumerable/IAsyncEnumerator known types.
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
Daniel Grunwald
3c2a26325e
Fix #1659 : Missing annotation on generic nullable reference types.
6 years ago
Siegfried Pammer
4db22c87e1
Implement detection of custom task implementations + tests.
6 years ago
Daniel Grunwald
cdc7a3641f
Fix references to nested types in generic classes.
6 years ago
Daniel Grunwald
c1510027df
Show attributes on type parameter constraints in C# decompilation.
6 years ago
Daniel Grunwald
7afa86d90c
Add support for "where T : notnull" constraint.
6 years ago
Daniel Grunwald
89ea6c3675
Fix TypeErasure not removing all nullability annotations.
6 years ago
Daniel Grunwald
afde03a04d
Fix #1597 : Incorrect handling of nullability annotations during generic type substitution.
6 years ago
Siegfried Pammer
9c1bf7fbdf
Introduce ReferenceKind in IParameter and ByReferenceResolveResult.
6 years ago
Daniel Grunwald
c366235246
#1349 : Fix type substitution for members of unknown generic types (due to unresolved references)
...
Also, assume that unknown inputs to ldfld are temporaries, not unmanaged pointers.
This avoids emitting weird pointer casts when accessing fields on unresolved value types.
6 years ago
Daniel Grunwald
b75c252193
Upgrade C# 8.0 nullability support for Roslyn 3.2.0-beta4.
6 years ago
Siegfried Pammer
6234ff7c9a
Apply changes as requested per code review.
6 years ago
Siegfried Pammer
37e14f43e3
Refactor/Clean up local functions representation in type system.
6 years ago
Daniel Grunwald
ccdabf2325
Fix a bunch of XmlDoc compiler warnings.
6 years ago
Daniel Grunwald
dec9c83c4c
Fix #1570 : Handle ReflectionNameParseException when decoding invalid attribute arguments
6 years ago
Siegfried Pammer
8d1522f387
Transform display classes used in local functions.
6 years ago
Siegfried Pammer
d965e6aa9e
Fix #1547 : Fully qualify attached properties in styles.
6 years ago
Daniel Grunwald
ab4e05f783
Don't perform DetectCatchWhenConditionBlocks transform when catchBlock.Variable.Type setter would throw an exception due to differing stack types.
6 years ago
Daniel Grunwald
7f2b3a4506
Fix #1529 : Handle exceptions on invalid metadata signatures
6 years ago
Siegfried Pammer
5a692610ff
Fix #1523 : Search throws EnumUnderlyingTypeResolverException
6 years ago
Siegfried Pammer
daf90bfe97
Fix #1488 : Ignore errors while decoding security declarations.
6 years ago
Daniel Grunwald
961923f4fd
#1499 , #1240 : Translate pointer arithmetic on managed pointers (ref T) using the System.Runtime.CompilerServices.Unsafe intrinsics
6 years ago