Skip to content

Preserve runtime types and bounded fresh-string fallback semantics - #394

Merged
CaelmBleidd merged 13 commits into
mainfrom
caelmbleidd/iccq-runtime-limitations
Oct 13, 2026
Merged

CaelmBleidd merged 13 commits into
mainfrom
caelmbleidd/iccq-runtime-limitations

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Unknown-call fallback lost finite return alternatives and sometimes treated ordinary object fields as builtin storage. Preserve finite literal return kinds, null/undefined and intersections; resolve inherited fields and ordinary object.length using the actual type contract. Fresh string mocks expose bounded UTF-16 backing rather than erasing strings to an unconstrained address. Synthetic EtsFakeType wrappers remain internal storage metadata and are rejected in type constraints before subtype shortcuts.

JacoDB is pinned to merged neo revision 7596ae5834, which includes JacoDB #434. Its frontend fix preserves explicitly declared null/undefined alternatives in call return types when TypeScript strictNullChecks is disabled.

Review: finite-union fallback in TsMock/TsExprResolver; structural/runtime field selection; the fake-type constraint invariant; fresh string bounds and source regressions; emitted runtime limitations. Open unions keep generic fallback and bounded-string capacity remains an explicit limit.

Local validation for f4be53969 with the published JacoDB artifact and its bundled TypeScript frontend: 65 tests passed, with 0 failures and 4 existing disabled tests skipped across type-system contracts, fresh-string returns, property presence, field access, typeof and truthiness/replay. The finite-union source assertion retains all five return alternatives, including null and undefined. The new invariant test fails on the previous implementation because no IllegalArgumentException is thrown, and passes with the restored require. Production/test compilation, Detekt main/test (0 code smells) and git diff --check passed.

@CaelmBleidd
CaelmBleidd force-pushed the caelmbleidd/stdlib-gap-models branch from e63ae37 to c75976b Compare October 13, 2026 00:05
@CaelmBleidd
CaelmBleidd force-pushed the caelmbleidd/iccq-runtime-limitations branch from 3598f5a to 93ee014 Compare October 13, 2026 01:54
@CaelmBleidd CaelmBleidd changed the title Handle residual TypeScript runtime limitations in Calls experiments Preserve runtime types and bounded fresh-string fallback semantics Oct 13, 2026
@CaelmBleidd
CaelmBleidd changed the base branch from caelmbleidd/stdlib-gap-models to main October 13, 2026 01:54
@CaelmBleidd
CaelmBleidd merged commit 1d2abda into main Oct 13, 2026
7 checks passed
@CaelmBleidd
CaelmBleidd deleted the caelmbleidd/iccq-runtime-limitations branch October 13, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant