-
- Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Another bug with comprehension inlining.
I made the fuzzer (carljm/compgenerator#1) use __a and __b as names in the hope of finding bugs around name mangling and got this one:
class __a: __a = (1)[[__a for __b in [1]]] = 1On #104602:
>>> class __a: ... __a = (1)[[__a for __b in [1]]] = 1 ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 2, in __a TypeError: 'int' object does not support item assignmentOn 3.11:
>>> class __a: ... __a = (1)[[__a for __b in [1]]] = 1 ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 2, in __a File "<stdin>", line 2, in <listcomp> NameError: name '_a__a' is not defined. Did you mean: '_a__b'?I think that means we're missing some name mangling, but haven't thought too deeply about this yet.
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error