Files
openide/python/testData/highlighting/asyncAndAwaitAsIdentifiersIn37.py
Mikhail Golubev fcf665e761 PY-64304 EA-247016 Report illegal usages of "await" expressions even if there is no operand
In other words, in a statement like "await = 42" there are now both a warning about
the missing operand and a warning that an await expression cannot be used as
an assignment target. This behavior is consistent with other expressions where
additional parsing errors are not special-cased.

GitOrigin-RevId: 37a68eacc7ec042435c185f9ddd8bc2eea42b40f
2024-04-24 09:03:57 +00:00

20 lines
557 B
Python

class <error descr="Identifier expected">async</error>:
pass
def <error descr="Identifier expected">async</error>():
pass
async<error descr="'def' or 'with' or 'for' expected"> </error>=<error descr="Statement expected, found Py:EQ"> </error>10
class <error descr="Identifier expected">await</error>:
pass
def <error descr="Identifier expected">await</error>():
pass
<error descr="'await' outside async function"><error descr="Cannot assign to await expression">await</error></error><error descr="Expression expected"> </error>= 10