From f2dbc9102251f092e93b7c87cd8ffa5e9e5b880b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 1 Mar 2020 09:40:43 -0600 Subject: py/compile: Raise an error on async with/for outside an async function. A simple reproducer is: async for x in (): x Before this change, it would cause an assertion error in mpy-cross and micropython-coverage. --- tests/basics/async_syntaxerror.py.exp | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/basics/async_syntaxerror.py.exp (limited to 'tests/basics/async_syntaxerror.py.exp') diff --git a/tests/basics/async_syntaxerror.py.exp b/tests/basics/async_syntaxerror.py.exp new file mode 100644 index 0000000000..5275689b41 --- /dev/null +++ b/tests/basics/async_syntaxerror.py.exp @@ -0,0 +1,2 @@ +SyntaxError +SyntaxError -- cgit v1.2.3