From d06af252b2e0f54878cb07116aa9814e02c516f7 Mon Sep 17 00:00:00 2001 From: Pavel Koneski Date: Fri, 26 Mar 2021 13:06:12 -0700 Subject: [PATCH] Fix debug assertion in ComprehensionScope.GetParentClosureTuple --- Src/IronPython/Compiler/Ast/Comprehension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/IronPython/Compiler/Ast/Comprehension.cs b/Src/IronPython/Compiler/Ast/Comprehension.cs index 81948fd44..42fbc20bd 100644 --- a/Src/IronPython/Compiler/Ast/Comprehension.cs +++ b/Src/IronPython/Compiler/Ast/Comprehension.cs @@ -246,7 +246,7 @@ internal override bool ExposesLocalVariable(PythonVariable variable) { } internal override MSAst.Expression/*!*/ GetParentClosureTuple() { - Debug.Assert(NeedsLocalContext); + Debug.Assert(NeedsLocalContext || IsClosure); return MSAst.Expression.Call(null, typeof(PythonOps).GetMethod(nameof(PythonOps.GetClosureTupleFromContext)), Parent.LocalContext); }