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
Commit 6c1f1d1
Browse filesBrowse the repository at this point in the historyBrowse files
rc: an interface-typed global initialized with a class object holds it (#656)
`let a: I = K.w` (a static field, another global, a field or an element)
gave the global no count of its own: claimGlobalInitializers looked
through casts and unions to the value a global is given, but not through
`ts.NewInterface`, the view a class object takes for an interface-typed
global. Giving either side a new value freed the block the other still
read (rc printed 999 for 1). A call's or a `new`'s reference
(`let a: I = mk()`, `let a: I = new V(8)`) was given back as a discarded
temporary at the end of the initializer, so the global was born pointing
at freed memory; under own too (`let a: I = mk()` read a freed block).
The initializer now looks through `ts.NewInterface` to the object.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments