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
runtime: reading a field of an out-of-bounds array element returns undefined instead of throwing TypeError #7153
TypeError: Cannot read properties of undefined (reading 'id')
Perry (main, and PERRY_PTR_SHAPE_LOCALS=0)
undefined
Reproduced against the base commit and with the representation-selection knob
off, so it is not a Ptr<Shape> defect — the guarded field-read path
itself is not throwing for an undefined receiver when the binding carries a
class annotation.
The annotation looks load-bearing: const missing: Row = short[5] makes the
declared type Named("Row"), and the field read appears to take a path that
assumes the receiver is an object rather than going through js_object_get_field_by_name_f64's ToObject check. Worth confirming whether an Any-typed binding throws correctly, which would localise it to the typed
fast path.
This is a silent wrong answer, not a crash, which is the worse shape: the
program continues with undefined where Node would have aborted.
Activity
fix(codegen): class-typed nullish field read throws TypeError (#7153) (…
codegen: collapse the class-field GET tower to one exit