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
Extend test coverage for object-literal/interface casts and method dispatch (#259)
* Extend test coverage for object-literal/interface casts and method dispatch
Adds four new test cases exercising variations not covered by the recent
interface-vtable-cast arc (#256-258), which only ever tested zero-argument,
single-method interfaces:
- 00object_annotated_method_params.ts: type-literal-annotated object
methods with PARAMETERS (that arc's fix only had zero-arg method
coverage), including a same-module chained sibling-method call.
- 00interface_object_array.ts: several distinct object literals (each its
own per-type constant vtable) collected into a single interface-typed
array and dispatched through the same call site in a loop - would catch
a shared/aliased vtable or wrong-`this` bug that a single-object test
can't.
- export/import_object_literal_structural_typed_params.ts: extends
export/import_object_literal_structural_typed.ts's cross-module coverage
along the "zero-arg -> parameterized method" axis.
Along the way, found and documented (not fixed) two new, real gaps in
docs/interface-vtable-simplification-design.md:
- a cross-module cast to a MULTI-method interface breaks for every vtable
slot past 0 (wrong value at slot 1, crash at slot 2+) - every prior test
in this arc only used single-method interfaces, so this was never
exercised before. The committed cross-module test deliberately stays
single-method to avoid committing a failing case.
- (same-module only, unrelated) a value-returning method can't `return
this.siblingMethod(...)` within the same type-literal-annotated object
literal - calling the sibling as a bare statement works fine. Avoided in
the committed tests.
Full ctest suite: 730/730 passed (722 + 8 new).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Update CMake configuration for Visual Studio 18 and adjust ROOT_PATH in typescript.cmake
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
|`addTwice(n)` (slot 1) | WRONG VALUE, no crash - `total` ends up incorrect but the process completes and reports the mismatch cleanly |
495
+
|`scaled(factor)` (slot 2) | CRASH - silent, no assert/error text reaches output at all (raw access violation with buffered stdout lost, unlike the controlled assert failures elsewhere in this file) |
0 commit comments