Browse Source

#1940: Ignore nullability in ETs

pull/1994/head
Siegfried Pammer 5 years ago
parent
commit
b92a4b956c
  1. 2
      ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs

2
ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs

@ -714,7 +714,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
var (falseInst, falseInstType) = ConvertInstruction(invocation.Arguments[2]); var (falseInst, falseInstType) = ConvertInstruction(invocation.Arguments[2]);
if (falseInst == null) if (falseInst == null)
return (null, SpecialType.UnknownType); return (null, SpecialType.UnknownType);
if (!trueInstType.Equals(falseInstType)) if (!NormalizeTypeVisitor.TypeErasure.EquivalentTypes(trueInstType, falseInstType))
return (null, SpecialType.UnknownType); return (null, SpecialType.UnknownType);
return (() => new IfInstruction(condition(), trueInst(), falseInst()), trueInstType); return (() => new IfInstruction(condition(), trueInst(), falseInst()), trueInstType);
} }

Loading…
Cancel
Save