|
|
|
@ -20,7 +20,6 @@ using System;
@@ -20,7 +20,6 @@ using System;
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Diagnostics; |
|
|
|
|
using System.Linq; |
|
|
|
|
using System.Reflection; |
|
|
|
|
|
|
|
|
|
using ICSharpCode.Decompiler.CSharp.Resolver; |
|
|
|
|
using ICSharpCode.Decompiler.Semantics; |
|
|
|
@ -1423,7 +1422,15 @@ namespace ICSharpCode.Decompiler.IL.Transforms
@@ -1423,7 +1422,15 @@ namespace ICSharpCode.Decompiler.IL.Transforms
|
|
|
|
|
value = call.Arguments[0]; |
|
|
|
|
if (call.Arguments.Count == 2) |
|
|
|
|
return MatchGetTypeFromHandle(call.Arguments[1], out type); |
|
|
|
|
type = value.InferType(context.TypeSystem); |
|
|
|
|
type = value switch { |
|
|
|
|
LdNull => SpecialType.NullType, |
|
|
|
|
LdStr => context.TypeSystem.FindType(KnownTypeCode.String), |
|
|
|
|
LdcF4 => context.TypeSystem.FindType(KnownTypeCode.Single), |
|
|
|
|
LdcF8 => context.TypeSystem.FindType(KnownTypeCode.Double), |
|
|
|
|
LdcI4 => context.TypeSystem.FindType(KnownTypeCode.Int32), |
|
|
|
|
LdcI8 => context.TypeSystem.FindType(KnownTypeCode.Int64), |
|
|
|
|
_ => value.InferType(context.TypeSystem), |
|
|
|
|
}; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|