Files
openide/python/testData/highlighting/yieldInsideAsyncDefPy35.py
Mikhail Golubev 10ac9a4b38 Don't wrap return type of explicitly annotated async generator in Coroutine
So that something like "async def f() -> AsyncIterable[int]" doesn't
return "Coroutine[AsyncIterable[int]]".

Also more reliably detect async generators to warn about non-empty
returns inside them.
2017-02-03 17:06:23 +03:00

6 lines
317 B
Python

async def foo(x):
await x
<error descr="Python version 3.5 does not support 'yield' inside async functions">yield x</error>
<error descr="Python does not support 'yield from' inside async functions">yield from x</error>
<error descr="non-empty 'return' inside asynchronous generator">return x</error>