Browse Source

Fix #1636: Remove assertion that delegates/expression trees must not be top-level expressions.

pull/1686/head
Siegfried Pammer 6 years ago
parent
commit
5e6479a5fa
  1. 2
      ICSharpCode.Decompiler/IL/Instructions/ILFunction.cs

2
ICSharpCode.Decompiler/IL/Instructions/ILFunction.cs

@ -214,13 +214,11 @@ namespace ICSharpCode.Decompiler.IL @@ -214,13 +214,11 @@ namespace ICSharpCode.Decompiler.IL
Debug.Assert(Method != null);
break;
case ILFunctionKind.Delegate:
Debug.Assert(Parent != null && !(Parent is Block));
Debug.Assert(DelegateType != null);
Debug.Assert(DeclarationScope == null);
Debug.Assert(!(DelegateType?.FullName == "System.Linq.Expressions.Expression" && DelegateType.TypeParameterCount == 1));
break;
case ILFunctionKind.ExpressionTree:
Debug.Assert(Parent != null && !(Parent is Block));
Debug.Assert(DelegateType != null);
Debug.Assert(DeclarationScope == null);
Debug.Assert(DelegateType?.FullName == "System.Linq.Expressions.Expression" && DelegateType.TypeParameterCount == 1);

Loading…
Cancel
Save