You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A capture-free class expression evaluated twice returns the same constructor #11298
Evaluating a class expression that captures nothing twice returns the same constructor. A property defined on the second evaluation's prototype is therefore visible to instances of the first.
Every evaluation of a class expression must produce a distinct constructor and a distinct prototype (ClassDefinitionEvaluation). The capture-free case lowers to one shared template class. PR #11297 makes classes that capture something distinct per evaluation, but it does not cover this case: a class with no captures never enters that path.
Found by the inherited-access lane while testing prototype-in-shape.
Activity
fix(hir): capture-free class expressions evaluate to distinct classes
fix(hir): capture-free class expressions evaluate to distinct classes