Browse Source

Fix #1352: Assertion in NullableLiftingTransform.DoLift

pull/1612/head
Daniel Grunwald 6 years ago
parent
commit
c3037afa70
  1. 2
      ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs

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

@ -710,7 +710,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
return (newInst, bits); return (newInst, bits);
} }
} else if (inst is Comp comp && !comp.IsLifted && comp.Kind == ComparisonKind.Equality } else if (inst is Comp comp && !comp.IsLifted && comp.Kind == ComparisonKind.Equality
&& MatchGetValueOrDefault(comp.Left, out ILVariable v) && MatchGetValueOrDefault(comp.Left, out ILVariable v) && nullableVars.Contains(v)
&& NullableType.GetUnderlyingType(v.Type).IsKnownType(KnownTypeCode.Boolean) && NullableType.GetUnderlyingType(v.Type).IsKnownType(KnownTypeCode.Boolean)
&& comp.Right.MatchLdcI4(0) && comp.Right.MatchLdcI4(0)
) { ) {

Loading…
Cancel
Save