Browse Source

Fix type mismatch in TypeSystemAstBuilder.ConvertConstantValue

pull/1198/head
Siegfried Pammer 7 years ago
parent
commit
a1ade47b7f
  1. 2
      ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs

2
ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs

@ -582,7 +582,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -582,7 +582,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
expr = new PrimitiveExpression(constantValue);
if (AddResolveResultAnnotations)
expr.AddAnnotation(new ConstantResolveResult(type, constantValue));
expr.AddAnnotation(new ConstantResolveResult(literalType, constantValue));
if (smallInteger && !type.Equals(expectedType)) {
expr = new CastExpression(ConvertType(type), expr);
}

Loading…
Cancel
Save