# Bug report ### Bug description: ```python class D: vals = [(lambda: __class__)() for _ in range(1)] ``` gives ``` SystemError: compiler_lookup_arg(name='__class__') with reftype=5 failed in D; freevars of code <lambda>: ('__class__',) ``` tested on main (f4bda4d6cb13d4c57fba30dbeb5a908ac23208e6) and on 3.12.8 (debug build). Issue #149806 looks related, but I tried that example on #149806 and it's not fixed by it. ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-150735 * gh-151211 * gh-151212 <!-- /gh-linked-prs -->
Bug report
Bug description:
gives
tested on main (f4bda4d) and on 3.12.8 (debug build). Issue #149806 looks related, but I tried that example on #149806 and it's not fixed by it.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
__class__and friends #150735__class__and friends (GH-150735) #151211__class__and friends (GH-150735) #151212