-
Notifications
You must be signed in to change notification settings - Fork 266
Labels
Description
Describe the Bug
This code produces an invalid-yield error:
c = lambda: (yield 1)
print(list(c()))ERROR Invalid `yield` outside of a function [invalid-yield]
--> y.py:1:14
|
1 | c = lambda: (yield 1)
| ^^^^^^^
|
INFO 1 error
The code runs fine:
$ python y.py
[1]
Version info
pyrefly 0.28.1
Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable