Daniel Grunwald
902f00ee7a
Add support for user-defined conversions starting with a constant expression conversion.
13 years ago
Daniel Grunwald
7eeb0348fb
Attempt that makes all the implicit conversions work
...
However, it introduces a problem with one of the explicit conversion test cases.
13 years ago
Erik Källén
e8131dca28
Implemented selection of best user-defined conversion operator according to §6.4.4 and §6.4.5
13 years ago
Daniel Grunwald
27978f44c7
Add 'allowOptionalParameters' flag to MGRR.PerformOverloadResolution.
13 years ago
Daniel Grunwald
59cc439a30
Added delegate compatibility check to method-group conversions.
13 years ago
Daniel Grunwald
875ee8d079
Add test: implicit long constant expression conversion to short
13 years ago
Daniel Grunwald
5670248de8
Add 'FullTypeName' struct, and use it to represent type names.
...
Contains some breaking API changes:
- Renamed 'FullNameAndTypeParameterCount' to 'TopLevelTypeName'.
- IAssembly.GetTypeDefinition(string, string, int) -> IAssembly.GetTypeDefinition(TopLevelTypeName)
- IAssembly.GetTypeDefinition(IUnresolvedTypeDefinition) -> IAssembly.GetTypeDefinition(FullTypeName)
- GetClassTypeReference now supports nested types
13 years ago
Daniel Grunwald
26409db2bb
Implemented explicit conversions - invalid casts now resolve to Conversion.None.
13 years ago
Daniel Grunwald
979fa91a2e
Fix icsharpcode/NRefactory#88 : implicit conversion between type parameters.
...
Convert from T to U where T : class, U. Only T is known to be a reference type; U is not.
C# still classifies the conversion as a reference conversion.
13 years ago
Daniel Grunwald
ea5e36c836
Fix icsharpcode/NRefactory#60 : Implicit type parameter conversion
13 years ago
Daniel Grunwald
ed0e4c5197
Fixed conversions from "dynamic" - these only exist from expressions, not from the type (this was causing subtle issues with type inference).
13 years ago
Erik Källén
0fec8d3474
Failing test that demonstrates that explicit user-defined conversions don't work.
13 years ago
Daniel Grunwald
b491ea85c3
Rename Conversions to CSharpConversions.
14 years ago
Daniel Grunwald
5c9dfb9896
Fixed IUnresolvedTypeDefinition.Resolve() and IAssembly.GetTypeDefinition(IUnresolvedTypeDefinition) to always retrieve the correct version of the type definition for the compilation, even if the IUnresolvedTypeDefinition is a different version.
...
The two methods now return UnknownType/null if the IUnresolvedTypeDefinition does not belong to the assembly.
14 years ago
Daniel Grunwald
942b4f70ef
Move ConversionResoleResult to ICSharpCode.NRefactory.Semantics.
...
Boxing conversion for attribute arguments is now used consistently in C# type system and Cecil-loaded type system.
14 years ago
Daniel Grunwald
9d7c018fb2
Adjusted C# resolver to refactored type system.
14 years ago
Daniel Grunwald
f9916d89ef
WIP: Type system refactoring.
14 years ago
Daniel Grunwald
f631199013
Type system refactoring: split unresolved/resolved type systems.
14 years ago
Daniel Grunwald
a1a80b63c9
Fix StackOverflowException when subtyping does not terminate due to expansive inheritance.
14 years ago
Daniel Grunwald
e37dc4b6c7
Move ResolveResults to NR.Semantics
14 years ago
Daniel Grunwald
5c585e110b
Apply license header to unit tests.
...
Add parser unit tests for ObjectCreateExpression.
14 years ago
Daniel Grunwald
37626e1bc7
Expose conversions as part of the ResolveResult.
14 years ago
Daniel Grunwald
6792a0c76a
Report which kind of conversion was found.
14 years ago
Daniel Grunwald
daf0f21607
Fixed some bugs related to conversions of type parameters.
14 years ago
Daniel Grunwald
5ae4d6070a
Conversions: add support for user-defined implicit conversions.
14 years ago
Daniel Grunwald
80a859c0cc
Add support for pointer types (implicit pointer conversion; operators defined on pointers).
15 years ago
Daniel Grunwald
2634564ad2
Rename Util to Utils; added replaced "object CacheToken" with "CacheManager CacheManager"
15 years ago
Daniel Grunwald
a7790c8de0
Add subtraction and shift operators.
15 years ago
Daniel Grunwald
ca28cd6478
Add support for multiplication, division, modulus and addition operators.
15 years ago
Daniel Grunwald
b46cfa7e29
Added CastTests.
...
Constant folding: fixed implicit conversions and casts to use C# semantics
15 years ago
Daniel Grunwald
2853feea02
Rewrite GetAllBaseTypes() to ensure the output is finite; and add unit tests for it.
15 years ago
Daniel Grunwald
f3a8325390
Add BetterConversion logic to C# Conversions.
15 years ago
Daniel Grunwald
5c57f8fd0d
Add support for integer literal conversions.
15 years ago
Daniel Grunwald
e19cf3785c
Added unit tests for C# implicit conversions and fixed a few bugs.
15 years ago