Files
openide/python/testData/highlighting/nonEmptyReturnInsideAsyncDef.py
Semyon Proshev d74244f6ac PY-20770 Fixed: Support Python 3.6 asynchronous generators and comprehensions
Introduce fake __asyncgenerator type for async generator objects described in PEP 525.
Update PyFunctionImpl.createCoroutineType to convert __generator to __asyncgenerator.
Update PyTargetExpressionImpl.getIterationType to infer type of elements which are getting from async generator
Highlight non-empty return inside async generators as error
2016-09-30 18:04:58 +03:00

11 lines
182 B
Python

async def foo(x):
await x
yield x
<error descr="non-empty 'return' inside asynchronous generator">return x</error>
async def bar(x):
await x
yield x
return