|
|
|
@ -167,16 +167,19 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -167,16 +167,19 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
} |
|
|
|
|
else if (inst is ILiftableInstruction liftable && liftable.IsLifted) |
|
|
|
|
{ |
|
|
|
|
Debug.Assert(NullableType.IsNullable(cexpr.Type)); |
|
|
|
|
IType underlying = NullableType.GetUnderlyingType(cexpr.Type); |
|
|
|
|
if (liftable.UnderlyingResultType.IsIntegerType()) |
|
|
|
|
if (liftable.UnderlyingResultType != StackType.Unknown) |
|
|
|
|
{ |
|
|
|
|
Debug.Assert(underlying.GetStackType().IsIntegerType(), "IL instructions of integer type must convert into C# expressions of integer type"); |
|
|
|
|
Debug.Assert(underlying.GetSign() != Sign.None, "Must have a sign specified for zero/sign-extension"); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
Debug.Assert(underlying.GetStackType() == liftable.UnderlyingResultType); |
|
|
|
|
Debug.Assert(NullableType.IsNullable(cexpr.Type)); |
|
|
|
|
IType underlying = NullableType.GetUnderlyingType(cexpr.Type); |
|
|
|
|
if (liftable.UnderlyingResultType.IsIntegerType()) |
|
|
|
|
{ |
|
|
|
|
Debug.Assert(underlying.GetStackType().IsIntegerType(), "IL instructions of integer type must convert into C# expressions of integer type"); |
|
|
|
|
Debug.Assert(underlying.GetSign() != Sign.None, "Must have a sign specified for zero/sign-extension"); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
Debug.Assert(underlying.GetStackType() == liftable.UnderlyingResultType); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if (inst.ResultType == StackType.Ref) |
|
|
|
|