summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/async_syntaxerror.py.exp
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-03-01 09:40:43 -0600
committerDamien George <damien@micropython.org>2021-05-30 10:38:48 +1000
commitf2dbc9102251f092e93b7c87cd8ffa5e9e5b880b (patch)
treef1f42bde0323d14ada0f8a057ac2956833a500eb /tests/basics/async_syntaxerror.py.exp
parenta60ad3364132b9c4a30b20cd91fd5cd1ac965618 (diff)
downloadmicropython-f2dbc9102251f092e93b7c87cd8ffa5e9e5b880b.tar.gz
micropython-f2dbc9102251f092e93b7c87cd8ffa5e9e5b880b.zip
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.
Diffstat (limited to 'tests/basics/async_syntaxerror.py.exp')
-rw-r--r--tests/basics/async_syntaxerror.py.exp2
1 files changed, 2 insertions, 0 deletions
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