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.
This commit is contained in:
Jeff Epler
2020-03-01 09:40:43 -06:00
committed by Damien George
parent a60ad33641
commit f2dbc91022
3 changed files with 37 additions and 6 deletions

View File

@@ -0,0 +1,2 @@
SyntaxError
SyntaxError