aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 81f27e91f4..b8bc94cf7c 100644
--- a/parse.y
+++ b/parse.y
@@ -4349,7 +4349,7 @@ k_return : keyword_return
k_yield : keyword_yield
{
- if (!p->ctxt.in_defined && !p->ctxt.in_def && !dyna_in_block(p))
+ if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
yyerror1(&@1, "Invalid yield");
}
;