|
|
|
|
@ -117,6 +117,22 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation
@@ -117,6 +117,22 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation
|
|
|
|
|
return new NullabilityAnnotatedType(this, nullability); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns this type without the knowledge whether it is a reference type.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// Whether an unresolvable type is a reference type is not a property of the type, but of
|
|
|
|
|
/// the metadata that mentioned it: a signature spelling it `valuetype T` yields false, a
|
|
|
|
|
/// bare TypeRef yields null. Two such spellings of the same missing type must still compare
|
|
|
|
|
/// equal after type erasure, so NormalizeTypeVisitor drops the flag before comparing.
|
|
|
|
|
/// </remarks>
|
|
|
|
|
internal UnknownType WithoutReferenceTypeKnowledge() |
|
|
|
|
{ |
|
|
|
|
if (isReferenceType == null) |
|
|
|
|
return this; |
|
|
|
|
return new UnknownType(fullTypeName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override int GetHashCode() |
|
|
|
|
{ |
|
|
|
|
return (namespaceKnown ? 812571 : 12651) ^ fullTypeName.GetHashCode(); |
|
|
|
|
|