From 4ddb838f8b03bfbbce0b7c1ffec4cf1dd1f34ec6 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 30 Aug 2017 11:26:05 +1000 Subject: [PATCH] py/compile2: Raise SyntaxError if positional args are given after */**. A port of 1e70fda69fcb4991eb60ed43e610f664ea1319e6 --- py/compile2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/compile2.c b/py/compile2.c index 94a7591703..b22ae8b940 100644 --- a/py/compile2.c +++ b/py/compile2.c @@ -2248,6 +2248,10 @@ STATIC void compile_trailer_paren_helper(compiler_t *comp, const byte *p_arglist n_keyword += 1; } } else { + if (star_flags) { + compile_syntax_error(comp, p, "non-keyword arg after */**"); + return; + } if (n_keyword > 0) { compile_syntax_error(comp, p, "non-keyword arg after keyword arg"); return;