blaise/stdlib
Graeme Geldenhuys e72b644a94 fix(stdlib,semantic): TObjectList default property + chained default-subscript crash (#138)
TObjectList.Items lacked the `default` directive, so OL[i] failed with
'String subscript requires a string expression' even though TStringList.Strings
already had it. Add `default;` to TObjectList.Items.

Separately, TStringList(OL[0])[1] — a typecast whose operand is itself a
default-property subscript, indexed again by a default property — crashed the
compiler. AnalyseStringSubscriptExpr rewrites the node in place (swaps StrExpr
for a synthesised field-access, clears IndexExpr) on the default/indexed-property
paths; the outer subscript re-analyses its typecast base, which re-analyses the
already-rewritten inner subscript, recursing without bound. Guard against
re-analysis by returning the cached ResolvedType when already set, and set
ResolvedType on the plain-string exit path so the guard is complete.

Regression test TestRun_DefaultProp_StringList_And_ObjectList compiles+runs the
issue's exact example on both backends with parity.
2026-06-24 12:32:11 +01:00
..
src fix(stdlib,semantic): TObjectList default property + chained default-subscript crash (#138) 2026-06-24 12:32:11 +01:00
project.xml feat(stdlib): add JSON library (writer, DOM, parser, reader) 2026-06-22 20:07:34 +01:00