@tsonic/frontend 0.0.73 → 0.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/core-intrinsics/provenance.d.ts +7 -0
- package/dist/core-intrinsics/provenance.d.ts.map +1 -1
- package/dist/core-intrinsics/provenance.js +28 -8
- package/dist/core-intrinsics/provenance.js.map +1 -1
- package/dist/graph/extraction/imports.d.ts.map +1 -1
- package/dist/graph/extraction/imports.js +2 -0
- package/dist/graph/extraction/imports.js.map +1 -1
- package/dist/ir/binding/binding-call-resolution-calls.d.ts +11 -0
- package/dist/ir/binding/binding-call-resolution-calls.d.ts.map +1 -0
- package/dist/ir/binding/binding-call-resolution-calls.js +974 -0
- package/dist/ir/binding/binding-call-resolution-calls.js.map +1 -0
- package/dist/ir/binding/binding-call-resolution-candidates.d.ts +15 -0
- package/dist/ir/binding/binding-call-resolution-candidates.d.ts.map +1 -0
- package/dist/ir/binding/binding-call-resolution-candidates.js +178 -0
- package/dist/ir/binding/binding-call-resolution-candidates.js.map +1 -0
- package/dist/ir/binding/binding-call-resolution.d.ts +11 -0
- package/dist/ir/binding/binding-call-resolution.d.ts.map +1 -0
- package/dist/ir/binding/binding-call-resolution.js +11 -0
- package/dist/ir/binding/binding-call-resolution.js.map +1 -0
- package/dist/ir/binding/binding-factory.d.ts +7 -4
- package/dist/ir/binding/binding-factory.d.ts.map +1 -1
- package/dist/ir/binding/binding-factory.js +44 -829
- package/dist/ir/binding/binding-factory.js.map +1 -1
- package/dist/ir/binding/binding-helpers.d.ts +1 -0
- package/dist/ir/binding/binding-helpers.d.ts.map +1 -1
- package/dist/ir/binding/binding-helpers.js +37 -14
- package/dist/ir/binding/binding-helpers.js.map +1 -1
- package/dist/ir/binding/binding-registry.d.ts +52 -0
- package/dist/ir/binding/binding-registry.d.ts.map +1 -0
- package/dist/ir/binding/binding-registry.js +582 -0
- package/dist/ir/binding/binding-registry.js.map +1 -0
- package/dist/ir/binding/binding-types.d.ts +2 -0
- package/dist/ir/binding/binding-types.d.ts.map +1 -1
- package/dist/ir/binding-resolution-cases/extension-method-binding.test.d.ts +7 -0
- package/dist/ir/binding-resolution-cases/extension-method-binding.test.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/extension-method-binding.test.js +463 -0
- package/dist/ir/binding-resolution-cases/extension-method-binding.test.js.map +1 -0
- package/dist/ir/binding-resolution-cases/extension-method-owner-resolution.test.d.ts +6 -0
- package/dist/ir/binding-resolution-cases/extension-method-owner-resolution.test.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/extension-method-owner-resolution.test.js +252 -0
- package/dist/ir/binding-resolution-cases/extension-method-owner-resolution.test.js.map +1 -0
- package/dist/ir/binding-resolution-cases/extension-method-tsbindgen-modifiers.test.d.ts +6 -0
- package/dist/ir/binding-resolution-cases/extension-method-tsbindgen-modifiers.test.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/extension-method-tsbindgen-modifiers.test.js +369 -0
- package/dist/ir/binding-resolution-cases/extension-method-tsbindgen-modifiers.test.js.map +1 -0
- package/dist/ir/binding-resolution-cases/extract-type-name.test.d.ts +5 -0
- package/dist/ir/binding-resolution-cases/extract-type-name.test.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/extract-type-name.test.js +57 -0
- package/dist/ir/binding-resolution-cases/extract-type-name.test.js.map +1 -0
- package/dist/ir/binding-resolution-cases/global-binding-preferences.test.d.ts +5 -0
- package/dist/ir/binding-resolution-cases/global-binding-preferences.test.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/global-binding-preferences.test.js +323 -0
- package/dist/ir/binding-resolution-cases/global-binding-preferences.test.js.map +1 -0
- package/dist/ir/binding-resolution-cases/global-identifier-resolution.test.d.ts +5 -0
- package/dist/ir/binding-resolution-cases/global-identifier-resolution.test.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/global-identifier-resolution.test.js +1057 -0
- package/dist/ir/binding-resolution-cases/global-identifier-resolution.test.js.map +1 -0
- package/dist/ir/binding-resolution-cases/helpers.d.ts +38 -0
- package/dist/ir/binding-resolution-cases/helpers.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/helpers.js +59 -0
- package/dist/ir/binding-resolution-cases/helpers.js.map +1 -0
- package/dist/ir/binding-resolution-cases/hierarchical-binding-resolution.test.d.ts +5 -0
- package/dist/ir/binding-resolution-cases/hierarchical-binding-resolution.test.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/hierarchical-binding-resolution.test.js +259 -0
- package/dist/ir/binding-resolution-cases/hierarchical-binding-resolution.test.js.map +1 -0
- package/dist/ir/binding-resolution-cases/imported-globals-shadowing.test.d.ts +2 -0
- package/dist/ir/binding-resolution-cases/imported-globals-shadowing.test.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/imported-globals-shadowing.test.js +566 -0
- package/dist/ir/binding-resolution-cases/imported-globals-shadowing.test.js.map +1 -0
- package/dist/ir/binding-resolution-cases/js-array-member-binding.test.d.ts +5 -0
- package/dist/ir/binding-resolution-cases/js-array-member-binding.test.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/js-array-member-binding.test.js +186 -0
- package/dist/ir/binding-resolution-cases/js-array-member-binding.test.js.map +1 -0
- package/dist/ir/binding-resolution-cases/module-import-type-alias-renaming.test.d.ts +6 -0
- package/dist/ir/binding-resolution-cases/module-import-type-alias-renaming.test.d.ts.map +1 -0
- package/dist/ir/binding-resolution-cases/module-import-type-alias-renaming.test.js +198 -0
- package/dist/ir/binding-resolution-cases/module-import-type-alias-renaming.test.js.map +1 -0
- package/dist/ir/binding-resolution.test.d.ts +9 -4
- package/dist/ir/binding-resolution.test.d.ts.map +1 -1
- package/dist/ir/binding-resolution.test.js +9 -1428
- package/dist/ir/binding-resolution.test.js.map +1 -1
- package/dist/ir/bindings-disambiguation-cases/failure-disambiguation.test.d.ts +8 -0
- package/dist/ir/bindings-disambiguation-cases/failure-disambiguation.test.d.ts.map +1 -0
- package/dist/ir/bindings-disambiguation-cases/failure-disambiguation.test.js +255 -0
- package/dist/ir/bindings-disambiguation-cases/failure-disambiguation.test.js.map +1 -0
- package/dist/ir/bindings-disambiguation-cases/success-disambiguation.test.d.ts +11 -0
- package/dist/ir/bindings-disambiguation-cases/success-disambiguation.test.d.ts.map +1 -0
- package/dist/ir/bindings-disambiguation-cases/success-disambiguation.test.js +326 -0
- package/dist/ir/bindings-disambiguation-cases/success-disambiguation.test.js.map +1 -0
- package/dist/ir/bindings-disambiguation.test.d.ts +2 -10
- package/dist/ir/bindings-disambiguation.test.d.ts.map +1 -1
- package/dist/ir/bindings-disambiguation.test.js +2 -561
- package/dist/ir/bindings-disambiguation.test.js.map +1 -1
- package/dist/ir/builder/exports.d.ts +2 -2
- package/dist/ir/builder/exports.d.ts.map +1 -1
- package/dist/ir/builder/exports.js +6 -10
- package/dist/ir/builder/exports.js.map +1 -1
- package/dist/ir/builder/imports.d.ts.map +1 -1
- package/dist/ir/builder/imports.js +105 -62
- package/dist/ir/builder/imports.js.map +1 -1
- package/dist/ir/builder/orchestrator.d.ts.map +1 -1
- package/dist/ir/builder/orchestrator.js +7 -9
- package/dist/ir/builder/orchestrator.js.map +1 -1
- package/dist/ir/builder/statements.d.ts +5 -0
- package/dist/ir/builder/statements.d.ts.map +1 -1
- package/dist/ir/builder/statements.js +16 -5
- package/dist/ir/builder/statements.js.map +1 -1
- package/dist/ir/builder-cases/_test-helpers.d.ts +61 -0
- package/dist/ir/builder-cases/_test-helpers.d.ts.map +1 -0
- package/dist/ir/builder-cases/_test-helpers.js +123 -0
- package/dist/ir/builder-cases/_test-helpers.js.map +1 -0
- package/dist/ir/builder-cases/call-inference-generics/alias-cache.test.d.ts +2 -0
- package/dist/ir/builder-cases/call-inference-generics/alias-cache.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/call-inference-generics/alias-cache.test.js +123 -0
- package/dist/ir/builder-cases/call-inference-generics/alias-cache.test.js.map +1 -0
- package/dist/ir/builder-cases/call-inference-generics/context-threading.test.d.ts +2 -0
- package/dist/ir/builder-cases/call-inference-generics/context-threading.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/call-inference-generics/context-threading.test.js +839 -0
- package/dist/ir/builder-cases/call-inference-generics/context-threading.test.js.map +1 -0
- package/dist/ir/builder-cases/clr-identity.test.d.ts +5 -0
- package/dist/ir/builder-cases/clr-identity.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/clr-identity.test.js +188 -0
- package/dist/ir/builder-cases/clr-identity.test.js.map +1 -0
- package/dist/ir/builder-cases/clr-iterable-overload-resolution.test.d.ts +2 -0
- package/dist/ir/builder-cases/clr-iterable-overload-resolution.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/clr-iterable-overload-resolution.test.js +1436 -0
- package/dist/ir/builder-cases/clr-iterable-overload-resolution.test.js.map +1 -0
- package/dist/ir/builder-cases/conditional-narrowing.test.d.ts +5 -0
- package/dist/ir/builder-cases/conditional-narrowing.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/conditional-narrowing.test.js +598 -0
- package/dist/ir/builder-cases/conditional-narrowing.test.js.map +1 -0
- package/dist/ir/builder-cases/contextual-typing-middleware.test.d.ts +5 -0
- package/dist/ir/builder-cases/contextual-typing-middleware.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/contextual-typing-middleware.test.js +384 -0
- package/dist/ir/builder-cases/contextual-typing-middleware.test.js.map +1 -0
- package/dist/ir/builder-cases/expression-conversion.test.d.ts +5 -0
- package/dist/ir/builder-cases/expression-conversion.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/expression-conversion.test.js +712 -0
- package/dist/ir/builder-cases/expression-conversion.test.js.map +1 -0
- package/dist/ir/builder-cases/fluent-and-nullable-params.test.d.ts +5 -0
- package/dist/ir/builder-cases/fluent-and-nullable-params.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/fluent-and-nullable-params.test.js +170 -0
- package/dist/ir/builder-cases/fluent-and-nullable-params.test.js.map +1 -0
- package/dist/ir/builder-cases/for-of-loops.test.d.ts +5 -0
- package/dist/ir/builder-cases/for-of-loops.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/for-of-loops.test.js +367 -0
- package/dist/ir/builder-cases/for-of-loops.test.js.map +1 -0
- package/dist/ir/builder-cases/generic-call-parameter-specialization.test.d.ts +2 -0
- package/dist/ir/builder-cases/generic-call-parameter-specialization.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/generic-call-parameter-specialization.test.js +192 -0
- package/dist/ir/builder-cases/generic-call-parameter-specialization.test.js.map +1 -0
- package/dist/ir/builder-cases/implements-and-struct.test.d.ts +5 -0
- package/dist/ir/builder-cases/implements-and-struct.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/implements-and-struct.test.js +145 -0
- package/dist/ir/builder-cases/implements-and-struct.test.js.map +1 -0
- package/dist/ir/builder-cases/import-extraction.test.d.ts +5 -0
- package/dist/ir/builder-cases/import-extraction.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/import-extraction.test.js +852 -0
- package/dist/ir/builder-cases/import-extraction.test.js.map +1 -0
- package/dist/ir/builder-cases/imported-null-guard-assignments.test.d.ts +2 -0
- package/dist/ir/builder-cases/imported-null-guard-assignments.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/imported-null-guard-assignments.test.js +185 -0
- package/dist/ir/builder-cases/imported-null-guard-assignments.test.js.map +1 -0
- package/dist/ir/builder-cases/imported-union-aliases.test.d.ts +2 -0
- package/dist/ir/builder-cases/imported-union-aliases.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/imported-union-aliases.test.js +255 -0
- package/dist/ir/builder-cases/imported-union-aliases.test.js.map +1 -0
- package/dist/ir/builder-cases/installed-source-package-deterministic-typing.test.d.ts +2 -0
- package/dist/ir/builder-cases/installed-source-package-deterministic-typing.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/installed-source-package-deterministic-typing.test.js +1267 -0
- package/dist/ir/builder-cases/installed-source-package-deterministic-typing.test.js.map +1 -0
- package/dist/ir/builder-cases/invocation-flow-assertions.test.d.ts +2 -0
- package/dist/ir/builder-cases/invocation-flow-assertions.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/invocation-flow-assertions.test.js +198 -0
- package/dist/ir/builder-cases/invocation-flow-assertions.test.js.map +1 -0
- package/dist/ir/builder-cases/js-surface-helpers.test.d.ts +5 -0
- package/dist/ir/builder-cases/js-surface-helpers.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/js-surface-helpers.test.js +1990 -0
- package/dist/ir/builder-cases/js-surface-helpers.test.js.map +1 -0
- package/dist/ir/builder-cases/module-structure-and-exports.test.d.ts +5 -0
- package/dist/ir/builder-cases/module-structure-and-exports.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/module-structure-and-exports.test.js +97 -0
- package/dist/ir/builder-cases/module-structure-and-exports.test.js.map +1 -0
- package/dist/ir/builder-cases/namespace-imports-and-function-narrowing.test.d.ts +5 -0
- package/dist/ir/builder-cases/namespace-imports-and-function-narrowing.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/namespace-imports-and-function-narrowing.test.js +511 -0
- package/dist/ir/builder-cases/namespace-imports-and-function-narrowing.test.js.map +1 -0
- package/dist/ir/builder-cases/narrowing-isarray-and-typeof.test.d.ts +5 -0
- package/dist/ir/builder-cases/narrowing-isarray-and-typeof.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/narrowing-isarray-and-typeof.test.js +676 -0
- package/dist/ir/builder-cases/narrowing-isarray-and-typeof.test.js.map +1 -0
- package/dist/ir/builder-cases/object-exports-and-member-inference.test.d.ts +5 -0
- package/dist/ir/builder-cases/object-exports-and-member-inference.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/object-exports-and-member-inference.test.js +159 -0
- package/dist/ir/builder-cases/object-exports-and-member-inference.test.js.map +1 -0
- package/dist/ir/builder-cases/object-synthesis-advanced.test.d.ts +5 -0
- package/dist/ir/builder-cases/object-synthesis-advanced.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/object-synthesis-advanced.test.js +250 -0
- package/dist/ir/builder-cases/object-synthesis-advanced.test.js.map +1 -0
- package/dist/ir/builder-cases/object-synthesis.test.d.ts +5 -0
- package/dist/ir/builder-cases/object-synthesis.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/object-synthesis.test.js +254 -0
- package/dist/ir/builder-cases/object-synthesis.test.js.map +1 -0
- package/dist/ir/builder-cases/overload-family-markers.test.d.ts +2 -0
- package/dist/ir/builder-cases/overload-family-markers.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/overload-family-markers.test.js +264 -0
- package/dist/ir/builder-cases/overload-family-markers.test.js.map +1 -0
- package/dist/ir/builder-cases/overload-null-guard-selection.test.d.ts +2 -0
- package/dist/ir/builder-cases/overload-null-guard-selection.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/overload-null-guard-selection.test.js +210 -0
- package/dist/ir/builder-cases/overload-null-guard-selection.test.js.map +1 -0
- package/dist/ir/builder-cases/overload-stub-typing.test.d.ts +2 -0
- package/dist/ir/builder-cases/overload-stub-typing.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/overload-stub-typing.test.js +111 -0
- package/dist/ir/builder-cases/overload-stub-typing.test.js.map +1 -0
- package/dist/ir/builder-cases/private-members-and-instanceof.test.d.ts +5 -0
- package/dist/ir/builder-cases/private-members-and-instanceof.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/private-members-and-instanceof.test.js +239 -0
- package/dist/ir/builder-cases/private-members-and-instanceof.test.js.map +1 -0
- package/dist/ir/builder-cases/promise-callback-typing.test.d.ts +5 -0
- package/dist/ir/builder-cases/promise-callback-typing.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/promise-callback-typing.test.js +977 -0
- package/dist/ir/builder-cases/promise-callback-typing.test.js.map +1 -0
- package/dist/ir/builder-cases/recursive-aliases-and-flow-types.test.d.ts +5 -0
- package/dist/ir/builder-cases/recursive-aliases-and-flow-types.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/recursive-aliases-and-flow-types.test.js +509 -0
- package/dist/ir/builder-cases/recursive-aliases-and-flow-types.test.js.map +1 -0
- package/dist/ir/builder-cases/statement-conversion.test.d.ts +5 -0
- package/dist/ir/builder-cases/statement-conversion.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/statement-conversion.test.js +240 -0
- package/dist/ir/builder-cases/statement-conversion.test.js.map +1 -0
- package/dist/ir/builder-cases/type-access-and-records.test.d.ts +5 -0
- package/dist/ir/builder-cases/type-access-and-records.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/type-access-and-records.test.js +420 -0
- package/dist/ir/builder-cases/type-access-and-records.test.js.map +1 -0
- package/dist/ir/builder-cases/typeof-narrowing-and-intrinsics.test.d.ts +5 -0
- package/dist/ir/builder-cases/typeof-narrowing-and-intrinsics.test.d.ts.map +1 -0
- package/dist/ir/builder-cases/typeof-narrowing-and-intrinsics.test.js +187 -0
- package/dist/ir/builder-cases/typeof-narrowing-and-intrinsics.test.js.map +1 -0
- package/dist/ir/builder.test.d.ts +27 -4
- package/dist/ir/builder.test.d.ts.map +1 -1
- package/dist/ir/builder.test.js +27 -3579
- package/dist/ir/builder.test.js.map +1 -1
- package/dist/ir/converters/access-paths.d.ts +20 -0
- package/dist/ir/converters/access-paths.d.ts.map +1 -0
- package/dist/ir/converters/access-paths.js +163 -0
- package/dist/ir/converters/access-paths.js.map +1 -0
- package/dist/ir/converters/array-type-guards.d.ts +7 -0
- package/dist/ir/converters/array-type-guards.d.ts.map +1 -0
- package/dist/ir/converters/array-type-guards.js +33 -0
- package/dist/ir/converters/array-type-guards.js.map +1 -0
- package/dist/ir/converters/assertion-wrapping.d.ts +4 -0
- package/dist/ir/converters/assertion-wrapping.d.ts.map +1 -0
- package/dist/ir/converters/assertion-wrapping.js +40 -0
- package/dist/ir/converters/assertion-wrapping.js.map +1 -0
- package/dist/ir/converters/expressions/access/access-converter.d.ts.map +1 -1
- package/dist/ir/converters/expressions/access/access-converter.js +104 -41
- package/dist/ir/converters/expressions/access/access-converter.js.map +1 -1
- package/dist/ir/converters/expressions/access/binding-resolution-hierarchical.d.ts +18 -0
- package/dist/ir/converters/expressions/access/binding-resolution-hierarchical.d.ts.map +1 -0
- package/dist/ir/converters/expressions/access/binding-resolution-hierarchical.js +347 -0
- package/dist/ir/converters/expressions/access/binding-resolution-hierarchical.js.map +1 -0
- package/dist/ir/converters/expressions/access/binding-resolution-memberid.d.ts +28 -0
- package/dist/ir/converters/expressions/access/binding-resolution-memberid.d.ts.map +1 -0
- package/dist/ir/converters/expressions/access/binding-resolution-memberid.js +522 -0
- package/dist/ir/converters/expressions/access/binding-resolution-memberid.js.map +1 -0
- package/dist/ir/converters/expressions/access/binding-resolution.d.ts +7 -31
- package/dist/ir/converters/expressions/access/binding-resolution.d.ts.map +1 -1
- package/dist/ir/converters/expressions/access/binding-resolution.js +7 -490
- package/dist/ir/converters/expressions/access/binding-resolution.js.map +1 -1
- package/dist/ir/converters/expressions/access/member-resolution.d.ts +7 -6
- package/dist/ir/converters/expressions/access/member-resolution.d.ts.map +1 -1
- package/dist/ir/converters/expressions/access/member-resolution.js +323 -77
- package/dist/ir/converters/expressions/access/member-resolution.js.map +1 -1
- package/dist/ir/converters/expressions/ambient-global-source-owner.d.ts +5 -0
- package/dist/ir/converters/expressions/ambient-global-source-owner.d.ts.map +1 -0
- package/dist/ir/converters/expressions/ambient-global-source-owner.js +252 -0
- package/dist/ir/converters/expressions/ambient-global-source-owner.js.map +1 -0
- package/dist/ir/converters/expressions/array-literals.d.ts +25 -0
- package/dist/ir/converters/expressions/array-literals.d.ts.map +1 -0
- package/dist/ir/converters/expressions/array-literals.js +356 -0
- package/dist/ir/converters/expressions/array-literals.js.map +1 -0
- package/dist/ir/converters/expressions/calls/bound-global-call-parameters.d.ts +13 -0
- package/dist/ir/converters/expressions/calls/bound-global-call-parameters.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/bound-global-call-parameters.js +56 -0
- package/dist/ir/converters/expressions/calls/bound-global-call-parameters.js.map +1 -0
- package/dist/ir/converters/expressions/calls/call-converter.d.ts +7 -17
- package/dist/ir/converters/expressions/calls/call-converter.d.ts.map +1 -1
- package/dist/ir/converters/expressions/calls/call-converter.js +7 -648
- package/dist/ir/converters/expressions/calls/call-converter.js.map +1 -1
- package/dist/ir/converters/expressions/calls/call-expression.d.ts +9 -0
- package/dist/ir/converters/expressions/calls/call-expression.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/call-expression.js +9 -0
- package/dist/ir/converters/expressions/calls/call-expression.js.map +1 -0
- package/dist/ir/converters/expressions/calls/call-general.d.ts +25 -0
- package/dist/ir/converters/expressions/calls/call-general.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/call-general.js +2237 -0
- package/dist/ir/converters/expressions/calls/call-general.js.map +1 -0
- package/dist/ir/converters/expressions/calls/call-intrinsics.d.ts +16 -0
- package/dist/ir/converters/expressions/calls/call-intrinsics.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/call-intrinsics.js +308 -0
- package/dist/ir/converters/expressions/calls/call-intrinsics.js.map +1 -0
- package/dist/ir/converters/expressions/calls/call-resolution.d.ts +58 -0
- package/dist/ir/converters/expressions/calls/call-resolution.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/call-resolution.js +293 -0
- package/dist/ir/converters/expressions/calls/call-resolution.js.map +1 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-argument-passing.d.ts +51 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-argument-passing.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-argument-passing.js +313 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-argument-passing.js.map +1 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-unification.d.ts +13 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-unification.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-unification.js +251 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-unification.js.map +1 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-unification.test.d.ts +2 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-unification.test.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-unification.test.js +18 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis-unification.test.js.map +1 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis.d.ts +12 -51
- package/dist/ir/converters/expressions/calls/call-site-analysis.d.ts.map +1 -1
- package/dist/ir/converters/expressions/calls/call-site-analysis.js +9 -524
- package/dist/ir/converters/expressions/calls/call-site-analysis.js.map +1 -1
- package/dist/ir/converters/expressions/calls/invocation-finalization.d.ts +56 -0
- package/dist/ir/converters/expressions/calls/invocation-finalization.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/invocation-finalization.js +723 -0
- package/dist/ir/converters/expressions/calls/invocation-finalization.js.map +1 -0
- package/dist/ir/converters/expressions/calls/new-converter.d.ts.map +1 -1
- package/dist/ir/converters/expressions/calls/new-converter.js +78 -3
- package/dist/ir/converters/expressions/calls/new-converter.js.map +1 -1
- package/dist/ir/converters/expressions/calls/source-backed-constructor-metadata.d.ts +22 -0
- package/dist/ir/converters/expressions/calls/source-backed-constructor-metadata.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/source-backed-constructor-metadata.js +257 -0
- package/dist/ir/converters/expressions/calls/source-backed-constructor-metadata.js.map +1 -0
- package/dist/ir/converters/expressions/collections.d.ts +5 -25
- package/dist/ir/converters/expressions/collections.d.ts.map +1 -1
- package/dist/ir/converters/expressions/collections.js +5 -883
- package/dist/ir/converters/expressions/collections.js.map +1 -1
- package/dist/ir/converters/expressions/dynamic-import.d.ts.map +1 -1
- package/dist/ir/converters/expressions/dynamic-import.js.map +1 -1
- package/dist/ir/converters/expressions/functions.d.ts.map +1 -1
- package/dist/ir/converters/expressions/functions.js +80 -65
- package/dist/ir/converters/expressions/functions.js.map +1 -1
- package/dist/ir/converters/expressions/helpers.js +1 -1
- package/dist/ir/converters/expressions/helpers.js.map +1 -1
- package/dist/ir/converters/expressions/import-meta.d.ts +3 -3
- package/dist/ir/converters/expressions/import-meta.d.ts.map +1 -1
- package/dist/ir/converters/expressions/import-meta.js +22 -8
- package/dist/ir/converters/expressions/import-meta.js.map +1 -1
- package/dist/ir/converters/expressions/literals.d.ts.map +1 -1
- package/dist/ir/converters/expressions/literals.js +31 -6
- package/dist/ir/converters/expressions/literals.js.map +1 -1
- package/dist/ir/converters/expressions/numeric-recovery-cases/call-return-and-intent.test.d.ts +9 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/call-return-and-intent.test.d.ts.map +1 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/call-return-and-intent.test.js +124 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/call-return-and-intent.test.js.map +1 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/e2e-integration.test.d.ts +8 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/e2e-integration.test.d.ts.map +1 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/e2e-integration.test.js +117 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/e2e-integration.test.js.map +1 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/property-access-recovery.test.d.ts +8 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/property-access-recovery.test.d.ts.map +1 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/property-access-recovery.test.js +170 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/property-access-recovery.test.js.map +1 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/test-helpers.d.ts +31 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/test-helpers.d.ts.map +1 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/test-helpers.js +183 -0
- package/dist/ir/converters/expressions/numeric-recovery-cases/test-helpers.js.map +1 -0
- package/dist/ir/converters/expressions/numeric-recovery.test.d.ts +3 -16
- package/dist/ir/converters/expressions/numeric-recovery.test.d.ts.map +1 -1
- package/dist/ir/converters/expressions/numeric-recovery.test.js +3 -407
- package/dist/ir/converters/expressions/numeric-recovery.test.js.map +1 -1
- package/dist/ir/converters/expressions/object-literal-helpers.d.ts +12 -0
- package/dist/ir/converters/expressions/object-literal-helpers.d.ts.map +1 -0
- package/dist/ir/converters/expressions/object-literal-helpers.js +12 -0
- package/dist/ir/converters/expressions/object-literal-helpers.js.map +1 -0
- package/dist/ir/converters/expressions/object-literal-synthesis.d.ts +27 -0
- package/dist/ir/converters/expressions/object-literal-synthesis.d.ts.map +1 -0
- package/dist/ir/converters/expressions/object-literal-synthesis.js +459 -0
- package/dist/ir/converters/expressions/object-literal-synthesis.js.map +1 -0
- package/dist/ir/converters/expressions/object-literal-type-helpers.d.ts +27 -0
- package/dist/ir/converters/expressions/object-literal-type-helpers.d.ts.map +1 -0
- package/dist/ir/converters/expressions/object-literal-type-helpers.js +267 -0
- package/dist/ir/converters/expressions/object-literal-type-helpers.js.map +1 -0
- package/dist/ir/converters/expressions/object-literals.d.ts +16 -0
- package/dist/ir/converters/expressions/object-literals.d.ts.map +1 -0
- package/dist/ir/converters/expressions/object-literals.js +317 -0
- package/dist/ir/converters/expressions/object-literals.js.map +1 -0
- package/dist/ir/converters/expressions/operators.d.ts.map +1 -1
- package/dist/ir/converters/expressions/operators.js +33 -19
- package/dist/ir/converters/expressions/operators.js.map +1 -1
- package/dist/ir/converters/expressions/other.d.ts +4 -2
- package/dist/ir/converters/expressions/other.d.ts.map +1 -1
- package/dist/ir/converters/expressions/other.js +32 -10
- package/dist/ir/converters/expressions/other.js.map +1 -1
- package/dist/ir/converters/flow-narrowing.d.ts +6 -25
- package/dist/ir/converters/flow-narrowing.d.ts.map +1 -1
- package/dist/ir/converters/flow-narrowing.js +5 -416
- package/dist/ir/converters/flow-narrowing.js.map +1 -1
- package/dist/ir/converters/heritage-reference-type.d.ts +5 -0
- package/dist/ir/converters/heritage-reference-type.d.ts.map +1 -0
- package/dist/ir/converters/heritage-reference-type.js +22 -0
- package/dist/ir/converters/heritage-reference-type.js.map +1 -0
- package/dist/ir/converters/narrowing-candidates.d.ts +7 -0
- package/dist/ir/converters/narrowing-candidates.d.ts.map +1 -0
- package/dist/ir/converters/narrowing-candidates.js +5 -0
- package/dist/ir/converters/narrowing-candidates.js.map +1 -0
- package/dist/ir/converters/narrowing-collection.d.ts +10 -0
- package/dist/ir/converters/narrowing-collection.d.ts.map +1 -0
- package/dist/ir/converters/narrowing-collection.js +10 -0
- package/dist/ir/converters/narrowing-collection.js.map +1 -0
- package/dist/ir/converters/narrowing-environment.d.ts +13 -0
- package/dist/ir/converters/narrowing-environment.d.ts.map +1 -0
- package/dist/ir/converters/narrowing-environment.js +83 -0
- package/dist/ir/converters/narrowing-environment.js.map +1 -0
- package/dist/ir/converters/narrowing-property-helpers.d.ts +8 -0
- package/dist/ir/converters/narrowing-property-helpers.d.ts.map +1 -0
- package/dist/ir/converters/narrowing-property-helpers.js +57 -0
- package/dist/ir/converters/narrowing-property-helpers.js.map +1 -0
- package/dist/ir/converters/narrowing-resolvers-equality.d.ts +22 -0
- package/dist/ir/converters/narrowing-resolvers-equality.d.ts.map +1 -0
- package/dist/ir/converters/narrowing-resolvers-equality.js +309 -0
- package/dist/ir/converters/narrowing-resolvers-equality.js.map +1 -0
- package/dist/ir/converters/narrowing-resolvers-equality.test.d.ts +2 -0
- package/dist/ir/converters/narrowing-resolvers-equality.test.d.ts.map +1 -0
- package/dist/ir/converters/narrowing-resolvers-equality.test.js +159 -0
- package/dist/ir/converters/narrowing-resolvers-equality.test.js.map +1 -0
- package/dist/ir/converters/narrowing-resolvers-typeof.d.ts +41 -0
- package/dist/ir/converters/narrowing-resolvers-typeof.d.ts.map +1 -0
- package/dist/ir/converters/narrowing-resolvers-typeof.js +251 -0
- package/dist/ir/converters/narrowing-resolvers-typeof.js.map +1 -0
- package/dist/ir/converters/narrowing-resolvers.d.ts +12 -0
- package/dist/ir/converters/narrowing-resolvers.d.ts.map +1 -0
- package/dist/ir/converters/narrowing-resolvers.js +10 -0
- package/dist/ir/converters/narrowing-resolvers.js.map +1 -0
- package/dist/ir/converters/narrowing-truthy.d.ts +19 -0
- package/dist/ir/converters/narrowing-truthy.d.ts.map +1 -0
- package/dist/ir/converters/narrowing-truthy.js +355 -0
- package/dist/ir/converters/narrowing-truthy.js.map +1 -0
- package/dist/ir/converters/reference-type-guards.d.ts +8 -0
- package/dist/ir/converters/reference-type-guards.d.ts.map +1 -0
- package/dist/ir/converters/reference-type-guards.js +51 -0
- package/dist/ir/converters/reference-type-guards.js.map +1 -0
- package/dist/ir/converters/reference-type-guards.test.d.ts +2 -0
- package/dist/ir/converters/reference-type-guards.test.d.ts.map +1 -0
- package/dist/ir/converters/reference-type-guards.test.js +51 -0
- package/dist/ir/converters/reference-type-guards.test.js.map +1 -0
- package/dist/ir/converters/return-expression-types.d.ts +3 -0
- package/dist/ir/converters/return-expression-types.d.ts.map +1 -0
- package/dist/ir/converters/return-expression-types.js +10 -0
- package/dist/ir/converters/return-expression-types.js.map +1 -0
- package/dist/ir/converters/statements/control/blocks.d.ts.map +1 -1
- package/dist/ir/converters/statements/control/blocks.js +75 -3
- package/dist/ir/converters/statements/control/blocks.js.map +1 -1
- package/dist/ir/converters/statements/control/conditionals.d.ts.map +1 -1
- package/dist/ir/converters/statements/control/conditionals.js +2 -12
- package/dist/ir/converters/statements/control/conditionals.js.map +1 -1
- package/dist/ir/converters/statements/control/loops.d.ts.map +1 -1
- package/dist/ir/converters/statements/control/loops.js +18 -4
- package/dist/ir/converters/statements/control/loops.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/constructors.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/constructors.js +36 -19
- package/dist/ir/converters/statements/declarations/classes/constructors.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/member-names.d.ts +5 -0
- package/dist/ir/converters/statements/declarations/classes/member-names.d.ts.map +1 -0
- package/dist/ir/converters/statements/declarations/classes/member-names.js +6 -0
- package/dist/ir/converters/statements/declarations/classes/member-names.js.map +1 -0
- package/dist/ir/converters/statements/declarations/classes/method-declaration.d.ts +11 -0
- package/dist/ir/converters/statements/declarations/classes/method-declaration.d.ts.map +1 -0
- package/dist/ir/converters/statements/declarations/classes/method-declaration.js +54 -0
- package/dist/ir/converters/statements/declarations/classes/method-declaration.js.map +1 -0
- package/dist/ir/converters/statements/declarations/classes/methods.d.ts +2 -15
- package/dist/ir/converters/statements/declarations/classes/methods.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/methods.js +2 -810
- package/dist/ir/converters/statements/declarations/classes/methods.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/orchestrator.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/orchestrator.js +15 -41
- package/dist/ir/converters/statements/declarations/classes/orchestrator.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/override-detection.d.ts +4 -1
- package/dist/ir/converters/statements/declarations/classes/override-detection.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/override-detection.js +18 -10
- package/dist/ir/converters/statements/declarations/classes/override-detection.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/properties.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/properties.js +10 -3
- package/dist/ir/converters/statements/declarations/classes/properties.js.map +1 -1
- package/dist/ir/converters/statements/declarations/functions.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/functions.js +8 -2
- package/dist/ir/converters/statements/declarations/functions.js.map +1 -1
- package/dist/ir/converters/statements/declarations/interfaces.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/interfaces.js +67 -2
- package/dist/ir/converters/statements/declarations/interfaces.js.map +1 -1
- package/dist/ir/converters/statements/declarations/overload-family-builders.d.ts +9 -0
- package/dist/ir/converters/statements/declarations/overload-family-builders.d.ts.map +1 -0
- package/dist/ir/converters/statements/declarations/overload-family-builders.js +21 -0
- package/dist/ir/converters/statements/declarations/overload-family-builders.js.map +1 -0
- package/dist/ir/converters/statements/declarations/type-aliases.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/type-aliases.js +12 -1
- package/dist/ir/converters/statements/declarations/type-aliases.js.map +1 -1
- package/dist/ir/converters/statements/declarations/variable-generic-lowering.d.ts +50 -0
- package/dist/ir/converters/statements/declarations/variable-generic-lowering.d.ts.map +1 -0
- package/dist/ir/converters/statements/declarations/variable-generic-lowering.js +281 -0
- package/dist/ir/converters/statements/declarations/variable-generic-lowering.js.map +1 -0
- package/dist/ir/converters/statements/declarations/variable-helpers.d.ts +29 -0
- package/dist/ir/converters/statements/declarations/variable-helpers.d.ts.map +1 -0
- package/dist/ir/converters/statements/declarations/variable-helpers.js +58 -0
- package/dist/ir/converters/statements/declarations/variable-helpers.js.map +1 -0
- package/dist/ir/converters/statements/declarations/variables-generic-function-values.d.ts +21 -0
- package/dist/ir/converters/statements/declarations/variables-generic-function-values.d.ts.map +1 -0
- package/dist/ir/converters/statements/declarations/variables-generic-function-values.js +263 -0
- package/dist/ir/converters/statements/declarations/variables-generic-function-values.js.map +1 -0
- package/dist/ir/converters/statements/declarations/variables.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/variables.js +3 -262
- package/dist/ir/converters/statements/declarations/variables.js.map +1 -1
- package/dist/ir/converters/synthetic-types.d.ts.map +1 -1
- package/dist/ir/converters/synthetic-types.js +83 -4
- package/dist/ir/converters/synthetic-types.js.map +1 -1
- package/dist/ir/converters/type-env.d.ts +3 -1
- package/dist/ir/converters/type-env.d.ts.map +1 -1
- package/dist/ir/converters/type-env.js +52 -19
- package/dist/ir/converters/type-env.js.map +1 -1
- package/dist/ir/expression-converter-dispatch.d.ts +21 -0
- package/dist/ir/expression-converter-dispatch.d.ts.map +1 -0
- package/dist/ir/expression-converter-dispatch.js +550 -0
- package/dist/ir/expression-converter-dispatch.js.map +1 -0
- package/dist/ir/expression-converter-helpers.d.ts +27 -0
- package/dist/ir/expression-converter-helpers.d.ts.map +1 -0
- package/dist/ir/expression-converter-helpers.js +172 -0
- package/dist/ir/expression-converter-helpers.js.map +1 -0
- package/dist/ir/expression-converter.d.ts +5 -15
- package/dist/ir/expression-converter.d.ts.map +1 -1
- package/dist/ir/expression-converter.js +5 -410
- package/dist/ir/expression-converter.js.map +1 -1
- package/dist/ir/field-marker.test.js +1 -1
- package/dist/ir/field-marker.test.js.map +1 -1
- package/dist/ir/json-global-typing.test.d.ts +2 -0
- package/dist/ir/json-global-typing.test.d.ts.map +1 -0
- package/dist/ir/json-global-typing.test.js +80 -0
- package/dist/ir/json-global-typing.test.js.map +1 -0
- package/dist/ir/program-context-factory.d.ts +25 -0
- package/dist/ir/program-context-factory.d.ts.map +1 -0
- package/dist/ir/program-context-factory.js +196 -0
- package/dist/ir/program-context-factory.js.map +1 -0
- package/dist/ir/program-context-types.d.ts +147 -0
- package/dist/ir/program-context-types.d.ts.map +1 -0
- package/dist/ir/program-context-types.js +123 -0
- package/dist/ir/program-context-types.js.map +1 -0
- package/dist/ir/program-context.d.ts +6 -122
- package/dist/ir/program-context.d.ts.map +1 -1
- package/dist/ir/program-context.js +5 -347
- package/dist/ir/program-context.js.map +1 -1
- package/dist/ir/program-context.test.js +20 -0
- package/dist/ir/program-context.test.js.map +1 -1
- package/dist/ir/syntax/overload-stubs.d.ts +4 -0
- package/dist/ir/syntax/overload-stubs.d.ts.map +1 -0
- package/dist/ir/syntax/overload-stubs.js +32 -0
- package/dist/ir/syntax/overload-stubs.js.map +1 -0
- package/dist/ir/syntax/property-names.d.ts +6 -0
- package/dist/ir/syntax/property-names.d.ts.map +1 -0
- package/dist/ir/syntax/property-names.js +116 -0
- package/dist/ir/syntax/property-names.js.map +1 -0
- package/dist/ir/type-system/call-resolution-callable-types.d.ts +10 -0
- package/dist/ir/type-system/call-resolution-callable-types.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-callable-types.js +288 -0
- package/dist/ir/type-system/call-resolution-callable-types.js.map +1 -0
- package/dist/ir/type-system/call-resolution-candidate-selection.d.ts +9 -0
- package/dist/ir/type-system/call-resolution-candidate-selection.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-candidate-selection.js +413 -0
- package/dist/ir/type-system/call-resolution-candidate-selection.js.map +1 -0
- package/dist/ir/type-system/call-resolution-inference.d.ts +12 -0
- package/dist/ir/type-system/call-resolution-inference.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-inference.js +12 -0
- package/dist/ir/type-system/call-resolution-inference.js.map +1 -0
- package/dist/ir/type-system/call-resolution-method-substitution.d.ts +12 -0
- package/dist/ir/type-system/call-resolution-method-substitution.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-method-substitution.js +115 -0
- package/dist/ir/type-system/call-resolution-method-substitution.js.map +1 -0
- package/dist/ir/type-system/call-resolution-parameters.d.ts +30 -0
- package/dist/ir/type-system/call-resolution-parameters.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-parameters.js +167 -0
- package/dist/ir/type-system/call-resolution-parameters.js.map +1 -0
- package/dist/ir/type-system/call-resolution-receiver-substitution.d.ts +12 -0
- package/dist/ir/type-system/call-resolution-receiver-substitution.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-receiver-substitution.js +134 -0
- package/dist/ir/type-system/call-resolution-receiver-substitution.js.map +1 -0
- package/dist/ir/type-system/call-resolution-resolve.d.ts +12 -0
- package/dist/ir/type-system/call-resolution-resolve.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-resolve.js +275 -0
- package/dist/ir/type-system/call-resolution-resolve.js.map +1 -0
- package/dist/ir/type-system/call-resolution-scoring.d.ts +18 -0
- package/dist/ir/type-system/call-resolution-scoring.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-scoring.js +166 -0
- package/dist/ir/type-system/call-resolution-scoring.js.map +1 -0
- package/dist/ir/type-system/call-resolution-signatures-catalog.d.ts +19 -0
- package/dist/ir/type-system/call-resolution-signatures-catalog.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-signatures-catalog.js +121 -0
- package/dist/ir/type-system/call-resolution-signatures-catalog.js.map +1 -0
- package/dist/ir/type-system/call-resolution-signatures-catalog.test.d.ts +2 -0
- package/dist/ir/type-system/call-resolution-signatures-catalog.test.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-signatures-catalog.test.js +88 -0
- package/dist/ir/type-system/call-resolution-signatures-catalog.test.js.map +1 -0
- package/dist/ir/type-system/call-resolution-signatures-raw.d.ts +21 -0
- package/dist/ir/type-system/call-resolution-signatures-raw.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-signatures-raw.js +242 -0
- package/dist/ir/type-system/call-resolution-signatures-raw.js.map +1 -0
- package/dist/ir/type-system/call-resolution-signatures.d.ts +10 -0
- package/dist/ir/type-system/call-resolution-signatures.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-signatures.js +10 -0
- package/dist/ir/type-system/call-resolution-signatures.js.map +1 -0
- package/dist/ir/type-system/call-resolution-type-ids.d.ts +43 -0
- package/dist/ir/type-system/call-resolution-type-ids.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-type-ids.js +465 -0
- package/dist/ir/type-system/call-resolution-type-ids.js.map +1 -0
- package/dist/ir/type-system/call-resolution-type-ids.test.d.ts +2 -0
- package/dist/ir/type-system/call-resolution-type-ids.test.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-type-ids.test.js +63 -0
- package/dist/ir/type-system/call-resolution-type-ids.test.js.map +1 -0
- package/dist/ir/type-system/call-resolution-unification.d.ts +18 -0
- package/dist/ir/type-system/call-resolution-unification.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-unification.js +637 -0
- package/dist/ir/type-system/call-resolution-unification.js.map +1 -0
- package/dist/ir/type-system/call-resolution-utilities.d.ts +11 -0
- package/dist/ir/type-system/call-resolution-utilities.d.ts.map +1 -0
- package/dist/ir/type-system/call-resolution-utilities.js +11 -0
- package/dist/ir/type-system/call-resolution-utilities.js.map +1 -0
- package/dist/ir/type-system/inference-declarations-overrides.d.ts +33 -0
- package/dist/ir/type-system/inference-declarations-overrides.d.ts.map +1 -0
- package/dist/ir/type-system/inference-declarations-overrides.js +241 -0
- package/dist/ir/type-system/inference-declarations-overrides.js.map +1 -0
- package/dist/ir/type-system/inference-declarations-types.d.ts +20 -0
- package/dist/ir/type-system/inference-declarations-types.d.ts.map +1 -0
- package/dist/ir/type-system/inference-declarations-types.js +475 -0
- package/dist/ir/type-system/inference-declarations-types.js.map +1 -0
- package/dist/ir/type-system/inference-declarations.d.ts +10 -0
- package/dist/ir/type-system/inference-declarations.d.ts.map +1 -0
- package/dist/ir/type-system/inference-declarations.js +10 -0
- package/dist/ir/type-system/inference-declarations.js.map +1 -0
- package/dist/ir/type-system/inference-expressions-infer.d.ts +25 -0
- package/dist/ir/type-system/inference-expressions-infer.d.ts.map +1 -0
- package/dist/ir/type-system/inference-expressions-infer.js +427 -0
- package/dist/ir/type-system/inference-expressions-infer.js.map +1 -0
- package/dist/ir/type-system/inference-expressions-lambda.d.ts +13 -0
- package/dist/ir/type-system/inference-expressions-lambda.d.ts.map +1 -0
- package/dist/ir/type-system/inference-expressions-lambda.js +101 -0
- package/dist/ir/type-system/inference-expressions-lambda.js.map +1 -0
- package/dist/ir/type-system/inference-expressions.d.ts +10 -0
- package/dist/ir/type-system/inference-expressions.d.ts.map +1 -0
- package/dist/ir/type-system/inference-expressions.js +10 -0
- package/dist/ir/type-system/inference-expressions.js.map +1 -0
- package/dist/ir/type-system/inference-initializers-call.d.ts +37 -0
- package/dist/ir/type-system/inference-initializers-call.d.ts.map +1 -0
- package/dist/ir/type-system/inference-initializers-call.js +242 -0
- package/dist/ir/type-system/inference-initializers-call.js.map +1 -0
- package/dist/ir/type-system/inference-initializers-variable.d.ts +14 -0
- package/dist/ir/type-system/inference-initializers-variable.d.ts.map +1 -0
- package/dist/ir/type-system/inference-initializers-variable.js +178 -0
- package/dist/ir/type-system/inference-initializers-variable.js.map +1 -0
- package/dist/ir/type-system/inference-initializers.d.ts +10 -0
- package/dist/ir/type-system/inference-initializers.d.ts.map +1 -0
- package/dist/ir/type-system/inference-initializers.js +10 -0
- package/dist/ir/type-system/inference-initializers.js.map +1 -0
- package/dist/ir/type-system/inference-member-id.d.ts +21 -0
- package/dist/ir/type-system/inference-member-id.d.ts.map +1 -0
- package/dist/ir/type-system/inference-member-id.js +402 -0
- package/dist/ir/type-system/inference-member-id.js.map +1 -0
- package/dist/ir/type-system/inference-member-lookup.d.ts +15 -0
- package/dist/ir/type-system/inference-member-lookup.d.ts.map +1 -0
- package/dist/ir/type-system/inference-member-lookup.js +567 -0
- package/dist/ir/type-system/inference-member-lookup.js.map +1 -0
- package/dist/ir/type-system/inference-member-resolution.d.ts +10 -0
- package/dist/ir/type-system/inference-member-resolution.d.ts.map +1 -0
- package/dist/ir/type-system/inference-member-resolution.js +10 -0
- package/dist/ir/type-system/inference-member-resolution.js.map +1 -0
- package/dist/ir/type-system/inference-type-preference.d.ts +9 -0
- package/dist/ir/type-system/inference-type-preference.d.ts.map +1 -0
- package/dist/ir/type-system/inference-type-preference.js +67 -0
- package/dist/ir/type-system/inference-type-preference.js.map +1 -0
- package/dist/ir/type-system/inference-utilities.d.ts +48 -0
- package/dist/ir/type-system/inference-utilities.d.ts.map +1 -0
- package/dist/ir/type-system/inference-utilities.js +182 -0
- package/dist/ir/type-system/inference-utilities.js.map +1 -0
- package/dist/ir/type-system/internal/handle-types.d.ts +12 -0
- package/dist/ir/type-system/internal/handle-types.d.ts.map +1 -1
- package/dist/ir/type-system/internal/nominal-env.d.ts +1 -1
- package/dist/ir/type-system/internal/nominal-env.d.ts.map +1 -1
- package/dist/ir/type-system/internal/nominal-env.js +12 -114
- package/dist/ir/type-system/internal/nominal-env.js.map +1 -1
- package/dist/ir/type-system/internal/registry-builder.d.ts +19 -0
- package/dist/ir/type-system/internal/registry-builder.d.ts.map +1 -0
- package/dist/ir/type-system/internal/registry-builder.js +292 -0
- package/dist/ir/type-system/internal/registry-builder.js.map +1 -0
- package/dist/ir/type-system/internal/registry-helpers-extraction.d.ts +69 -0
- package/dist/ir/type-system/internal/registry-helpers-extraction.d.ts.map +1 -0
- package/dist/ir/type-system/internal/registry-helpers-extraction.js +429 -0
- package/dist/ir/type-system/internal/registry-helpers-extraction.js.map +1 -0
- package/dist/ir/type-system/internal/registry-helpers-inference.d.ts +19 -0
- package/dist/ir/type-system/internal/registry-helpers-inference.d.ts.map +1 -0
- package/dist/ir/type-system/internal/registry-helpers-inference.js +237 -0
- package/dist/ir/type-system/internal/registry-helpers-inference.js.map +1 -0
- package/dist/ir/type-system/internal/registry-helpers.d.ts +12 -0
- package/dist/ir/type-system/internal/registry-helpers.d.ts.map +1 -0
- package/dist/ir/type-system/internal/registry-helpers.js +12 -0
- package/dist/ir/type-system/internal/registry-helpers.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types-core.d.ts +53 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types-core.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types-core.js +281 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types-core.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types-extract.d.ts +35 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types-extract.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types-extract.js +308 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types-extract.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types.d.ts +23 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types.js +23 -0
- package/dist/ir/type-system/internal/type-converter/conditional-utility-types.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/direct-alias-expansion.d.ts +5 -0
- package/dist/ir/type-system/internal/type-converter/direct-alias-expansion.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/direct-alias-expansion.js +232 -0
- package/dist/ir/type-system/internal/type-converter/direct-alias-expansion.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/functions.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/functions.js +21 -0
- package/dist/ir/type-system/internal/type-converter/functions.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/mapped-utility-expansion.d.ts +37 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-expansion.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-expansion.js +334 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-expansion.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-record.d.ts +27 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-record.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-record.js +174 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-record.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-types.d.ts +10 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-types.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-types.js +10 -0
- package/dist/ir/type-system/internal/type-converter/mapped-utility-types.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/objects.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/objects.js +11 -6
- package/dist/ir/type-system/internal/type-converter/objects.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/orchestrator.d.ts +6 -5
- package/dist/ir/type-system/internal/type-converter/orchestrator.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/orchestrator.js +80 -457
- package/dist/ir/type-system/internal/type-converter/orchestrator.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/orchestrator.test.js +49 -59
- package/dist/ir/type-system/internal/type-converter/orchestrator.test.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/primitives.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/primitives.js +9 -1
- package/dist/ir/type-system/internal/type-converter/primitives.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/references-alias.d.ts +21 -0
- package/dist/ir/type-system/internal/type-converter/references-alias.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-alias.js +267 -0
- package/dist/ir/type-system/internal/type-converter/references-alias.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-converter.d.ts +16 -0
- package/dist/ir/type-system/internal/type-converter/references-converter.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-converter.js +203 -0
- package/dist/ir/type-system/internal/type-converter/references-converter.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-normalize.d.ts +49 -0
- package/dist/ir/type-system/internal/type-converter/references-normalize.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-normalize.js +162 -0
- package/dist/ir/type-system/internal/type-converter/references-normalize.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-structural-bindings.d.ts +52 -0
- package/dist/ir/type-system/internal/type-converter/references-structural-bindings.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-structural-bindings.js +295 -0
- package/dist/ir/type-system/internal/type-converter/references-structural-bindings.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-structural-members.d.ts +55 -0
- package/dist/ir/type-system/internal/type-converter/references-structural-members.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-structural-members.js +334 -0
- package/dist/ir/type-system/internal/type-converter/references-structural-members.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-structural.d.ts +12 -0
- package/dist/ir/type-system/internal/type-converter/references-structural.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references-structural.js +12 -0
- package/dist/ir/type-system/internal/type-converter/references-structural.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references.d.ts +8 -9
- package/dist/ir/type-system/internal/type-converter/references.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/references.js +7 -980
- package/dist/ir/type-system/internal/type-converter/references.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/type-operators.d.ts +16 -0
- package/dist/ir/type-system/internal/type-converter/type-operators.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/type-operators.js +197 -0
- package/dist/ir/type-system/internal/type-converter/type-operators.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/unions-intersections.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/unions-intersections.js +2 -4
- package/dist/ir/type-system/internal/type-converter/unions-intersections.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/comprehensive-expansion.test.d.ts +2 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/comprehensive-expansion.test.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/comprehensive-expansion.test.js +246 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/comprehensive-expansion.test.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-awaited-constructor-instance.test.d.ts +2 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-awaited-constructor-instance.test.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-awaited-constructor-instance.test.js +179 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-awaited-constructor-instance.test.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-nonnullable-exclude-extract.test.d.ts +2 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-nonnullable-exclude-extract.test.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-nonnullable-exclude-extract.test.js +277 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-nonnullable-exclude-extract.test.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-return-params.test.d.ts +2 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-return-params.test.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-return-params.test.js +163 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/conditional-return-params.test.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/expansion-safety.test.d.ts +2 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/expansion-safety.test.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/expansion-safety.test.js +305 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/expansion-safety.test.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/helpers.d.ts +38 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/helpers.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/helpers.js +127 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/helpers.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/record-expansion.test.d.ts +2 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/record-expansion.test.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/record-expansion.test.js +145 -0
- package/dist/ir/type-system/internal/type-converter/utility-types-cases/record-expansion.test.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types.d.ts +6 -76
- package/dist/ir/type-system/internal/type-converter/utility-types.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/utility-types.js +6 -1031
- package/dist/ir/type-system/internal/type-converter/utility-types.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/utility-types.test.d.ts +6 -9
- package/dist/ir/type-system/internal/type-converter/utility-types.test.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/utility-types.test.js +6 -1416
- package/dist/ir/type-system/internal/type-converter/utility-types.test.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/value-inference.d.ts +13 -0
- package/dist/ir/type-system/internal/type-converter/value-inference.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/value-inference.js +311 -0
- package/dist/ir/type-system/internal/type-converter/value-inference.js.map +1 -0
- package/dist/ir/type-system/internal/type-registry.d.ts +12 -12
- package/dist/ir/type-system/internal/type-registry.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-registry.js +4 -529
- package/dist/ir/type-system/internal/type-registry.js.map +1 -1
- package/dist/ir/type-system/internal/universe/catalog-types.d.ts +260 -0
- package/dist/ir/type-system/internal/universe/catalog-types.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/catalog-types.js +12 -0
- package/dist/ir/type-system/internal/universe/catalog-types.js.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-catalog.d.ts +7 -5
- package/dist/ir/type-system/internal/universe/clr-catalog.d.ts.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-catalog.js +160 -90
- package/dist/ir/type-system/internal/universe/clr-catalog.js.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-catalog.test.js +166 -72
- package/dist/ir/type-system/internal/universe/clr-catalog.test.js.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-entry-converter.d.ts +7 -47
- package/dist/ir/type-system/internal/universe/clr-entry-converter.d.ts.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-entry-converter.js +6 -694
- package/dist/ir/type-system/internal/universe/clr-entry-converter.js.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-heritage-enrichment.d.ts +10 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-enrichment.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-enrichment.js +168 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-enrichment.js.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-extraction.d.ts +28 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-extraction.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-extraction.js +307 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-extraction.js.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-extractor.d.ts +11 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-extractor.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-extractor.js +10 -0
- package/dist/ir/type-system/internal/universe/clr-heritage-extractor.js.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-raw-converter.d.ts +41 -0
- package/dist/ir/type-system/internal/universe/clr-raw-converter.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-raw-converter.js +364 -0
- package/dist/ir/type-system/internal/universe/clr-raw-converter.js.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-type-parser.d.ts +3 -41
- package/dist/ir/type-system/internal/universe/clr-type-parser.d.ts.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-type-parser.js +3 -470
- package/dist/ir/type-system/internal/universe/clr-type-parser.js.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-type-parser.test.js +13 -2
- package/dist/ir/type-system/internal/universe/clr-type-parser.test.js.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-type-string-parsing.d.ts +28 -0
- package/dist/ir/type-system/internal/universe/clr-type-string-parsing.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-type-string-parsing.js +208 -0
- package/dist/ir/type-system/internal/universe/clr-type-string-parsing.js.map +1 -0
- package/dist/ir/type-system/internal/universe/dts-type-node-conversion.d.ts +28 -0
- package/dist/ir/type-system/internal/universe/dts-type-node-conversion.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/dts-type-node-conversion.js +279 -0
- package/dist/ir/type-system/internal/universe/dts-type-node-conversion.js.map +1 -0
- package/dist/ir/type-system/internal/universe/index.d.ts +1 -1
- package/dist/ir/type-system/internal/universe/index.d.ts.map +1 -1
- package/dist/ir/type-system/internal/universe/index.js.map +1 -1
- package/dist/ir/type-system/internal/universe/raw-bindings-types.d.ts +167 -0
- package/dist/ir/type-system/internal/universe/raw-bindings-types.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/raw-bindings-types.js +79 -0
- package/dist/ir/type-system/internal/universe/raw-bindings-types.js.map +1 -0
- package/dist/ir/type-system/internal/universe/source-catalog.d.ts +1 -1
- package/dist/ir/type-system/internal/universe/source-catalog.d.ts.map +1 -1
- package/dist/ir/type-system/internal/universe/source-catalog.js.map +1 -1
- package/dist/ir/type-system/internal/universe/types.d.ts +4 -388
- package/dist/ir/type-system/internal/universe/types.d.ts.map +1 -1
- package/dist/ir/type-system/internal/universe/types.js +2 -60
- package/dist/ir/type-system/internal/universe/types.js.map +1 -1
- package/dist/ir/type-system/internal/universe/unified-universe.d.ts +2 -2
- package/dist/ir/type-system/internal/universe/unified-universe.d.ts.map +1 -1
- package/dist/ir/type-system/internal/universe/unified-universe.js +467 -19
- package/dist/ir/type-system/internal/universe/unified-universe.js.map +1 -1
- package/dist/ir/type-system/internal/universe/unified-universe.test.js +7 -2
- package/dist/ir/type-system/internal/universe/unified-universe.test.js.map +1 -1
- package/dist/ir/type-system/iterable-type-shapes.d.ts +8 -0
- package/dist/ir/type-system/iterable-type-shapes.d.ts.map +1 -0
- package/dist/ir/type-system/iterable-type-shapes.js +229 -0
- package/dist/ir/type-system/iterable-type-shapes.js.map +1 -0
- package/dist/ir/type-system/type-alias-expansion.d.ts +4 -0
- package/dist/ir/type-system/type-alias-expansion.d.ts.map +1 -0
- package/dist/ir/type-system/type-alias-expansion.js +27 -0
- package/dist/ir/type-system/type-alias-expansion.js.map +1 -0
- package/dist/ir/type-system/type-system-call-resolution.d.ts +16 -68
- package/dist/ir/type-system/type-system-call-resolution.d.ts.map +1 -1
- package/dist/ir/type-system/type-system-call-resolution.js +17 -1407
- package/dist/ir/type-system/type-system-call-resolution.js.map +1 -1
- package/dist/ir/type-system/type-system-factory.d.ts +24 -0
- package/dist/ir/type-system/type-system-factory.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-factory.js +145 -0
- package/dist/ir/type-system/type-system-factory.js.map +1 -0
- package/dist/ir/type-system/type-system-inference.d.ts +13 -92
- package/dist/ir/type-system/type-system-inference.d.ts.map +1 -1
- package/dist/ir/type-system/type-system-inference.js +18 -1315
- package/dist/ir/type-system/type-system-inference.js.map +1 -1
- package/dist/ir/type-system/type-system-relations.d.ts +1 -0
- package/dist/ir/type-system/type-system-relations.d.ts.map +1 -1
- package/dist/ir/type-system/type-system-relations.js +332 -19
- package/dist/ir/type-system/type-system-relations.js.map +1 -1
- package/dist/ir/type-system/type-system-state-call-types.d.ts +62 -0
- package/dist/ir/type-system/type-system-state-call-types.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-state-call-types.js +2 -0
- package/dist/ir/type-system/type-system-state-call-types.js.map +1 -0
- package/dist/ir/type-system/type-system-state-handle-types.d.ts +134 -0
- package/dist/ir/type-system/type-system-state-handle-types.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-state-handle-types.js +2 -0
- package/dist/ir/type-system/type-system-state-handle-types.js.map +1 -0
- package/dist/ir/type-system/type-system-state-helpers.d.ts +56 -0
- package/dist/ir/type-system/type-system-state-helpers.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-state-helpers.js +291 -0
- package/dist/ir/type-system/type-system-state-helpers.js.map +1 -0
- package/dist/ir/type-system/type-system-state-model.d.ts +33 -0
- package/dist/ir/type-system/type-system-state-model.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-state-model.js +3 -0
- package/dist/ir/type-system/type-system-state-model.js.map +1 -0
- package/dist/ir/type-system/type-system-state-registry-types.d.ts +11 -0
- package/dist/ir/type-system/type-system-state-registry-types.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-state-registry-types.js +17 -0
- package/dist/ir/type-system/type-system-state-registry-types.js.map +1 -0
- package/dist/ir/type-system/type-system-state-types.d.ts +4 -0
- package/dist/ir/type-system/type-system-state-types.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-state-types.js +4 -0
- package/dist/ir/type-system/type-system-state-types.js.map +1 -0
- package/dist/ir/type-system/type-system-state.d.ts +4 -454
- package/dist/ir/type-system/type-system-state.d.ts.map +1 -1
- package/dist/ir/type-system/type-system-state.js +4 -228
- package/dist/ir/type-system/type-system-state.js.map +1 -1
- package/dist/ir/type-system/type-system-types-api.d.ts +341 -0
- package/dist/ir/type-system/type-system-types-api.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-types-api.js +11 -0
- package/dist/ir/type-system/type-system-types-api.js.map +1 -0
- package/dist/ir/type-system/type-system-utilities.d.ts +4 -48
- package/dist/ir/type-system/type-system-utilities.d.ts.map +1 -1
- package/dist/ir/type-system/type-system-utilities.js +4 -347
- package/dist/ir/type-system/type-system-utilities.js.map +1 -1
- package/dist/ir/type-system/type-system.d.ts +8 -313
- package/dist/ir/type-system/type-system.d.ts.map +1 -1
- package/dist/ir/type-system/type-system.js +7 -131
- package/dist/ir/type-system/type-system.js.map +1 -1
- package/dist/ir/type-system/types.d.ts +2 -0
- package/dist/ir/type-system/types.d.ts.map +1 -1
- package/dist/ir/type-system/types.js +5 -0
- package/dist/ir/type-system/types.js.map +1 -1
- package/dist/ir/type-system/utility-type-filter-helpers.d.ts +40 -0
- package/dist/ir/type-system/utility-type-filter-helpers.d.ts.map +1 -0
- package/dist/ir/type-system/utility-type-filter-helpers.js +142 -0
- package/dist/ir/type-system/utility-type-filter-helpers.js.map +1 -0
- package/dist/ir/type-system/utility-type-mapped-helpers.d.ts +34 -0
- package/dist/ir/type-system/utility-type-mapped-helpers.d.ts.map +1 -0
- package/dist/ir/type-system/utility-type-mapped-helpers.js +243 -0
- package/dist/ir/type-system/utility-type-mapped-helpers.js.map +1 -0
- package/dist/ir/types/expressions-core.d.ts +331 -0
- package/dist/ir/types/expressions-core.d.ts.map +1 -0
- package/dist/ir/types/expressions-core.js +5 -0
- package/dist/ir/types/expressions-core.js.map +1 -0
- package/dist/ir/types/expressions-extended.d.ts +232 -0
- package/dist/ir/types/expressions-extended.d.ts.map +1 -0
- package/dist/ir/types/expressions-extended.js +6 -0
- package/dist/ir/types/expressions-extended.js.map +1 -0
- package/dist/ir/types/expressions.d.ts +6 -480
- package/dist/ir/types/expressions.d.ts.map +1 -1
- package/dist/ir/types/expressions.js +5 -1
- package/dist/ir/types/expressions.js.map +1 -1
- package/dist/ir/types/helpers.d.ts +4 -0
- package/dist/ir/types/helpers.d.ts.map +1 -1
- package/dist/ir/types/index.d.ts +4 -2
- package/dist/ir/types/index.d.ts.map +1 -1
- package/dist/ir/types/index.js +2 -1
- package/dist/ir/types/index.js.map +1 -1
- package/dist/ir/types/ir-substitution-builders.d.ts +91 -0
- package/dist/ir/types/ir-substitution-builders.d.ts.map +1 -0
- package/dist/ir/types/ir-substitution-builders.js +340 -0
- package/dist/ir/types/ir-substitution-builders.js.map +1 -0
- package/dist/ir/types/ir-substitution-core.d.ts +55 -0
- package/dist/ir/types/ir-substitution-core.d.ts.map +1 -0
- package/dist/ir/types/ir-substitution-core.js +402 -0
- package/dist/ir/types/ir-substitution-core.js.map +1 -0
- package/dist/ir/types/ir-substitution.d.ts +13 -142
- package/dist/ir/types/ir-substitution.d.ts.map +1 -1
- package/dist/ir/types/ir-substitution.js +9 -565
- package/dist/ir/types/ir-substitution.js.map +1 -1
- package/dist/ir/types/ir-types.d.ts +80 -4
- package/dist/ir/types/ir-types.d.ts.map +1 -1
- package/dist/ir/types/overload-family.d.ts +36 -0
- package/dist/ir/types/overload-family.d.ts.map +1 -0
- package/dist/ir/types/overload-family.js +9 -0
- package/dist/ir/types/overload-family.js.map +1 -0
- package/dist/ir/types/statements.d.ts +8 -1
- package/dist/ir/types/statements.d.ts.map +1 -1
- package/dist/ir/types/type-ops.d.ts +41 -2
- package/dist/ir/types/type-ops.d.ts.map +1 -1
- package/dist/ir/types/type-ops.js +744 -45
- package/dist/ir/types/type-ops.js.map +1 -1
- package/dist/ir/types/type-ops.test.js +443 -1
- package/dist/ir/types/type-ops.test.js.map +1 -1
- package/dist/ir/types.d.ts +2 -2
- package/dist/ir/types.d.ts.map +1 -1
- package/dist/ir/types.js +1 -1
- package/dist/ir/types.js.map +1 -1
- package/dist/ir/validation/anon-type-declaration-synthesis.d.ts +11 -0
- package/dist/ir/validation/anon-type-declaration-synthesis.d.ts.map +1 -0
- package/dist/ir/validation/anon-type-declaration-synthesis.js +11 -0
- package/dist/ir/validation/anon-type-declaration-synthesis.js.map +1 -0
- package/dist/ir/validation/anon-type-ir-rewriting.d.ts +10 -0
- package/dist/ir/validation/anon-type-ir-rewriting.d.ts.map +1 -0
- package/dist/ir/validation/anon-type-ir-rewriting.js +3 -0
- package/dist/ir/validation/anon-type-ir-rewriting.js.map +1 -0
- package/dist/ir/validation/anon-type-lower-expressions.d.ts +10 -0
- package/dist/ir/validation/anon-type-lower-expressions.d.ts.map +1 -0
- package/dist/ir/validation/anon-type-lower-expressions.js +364 -0
- package/dist/ir/validation/anon-type-lower-expressions.js.map +1 -0
- package/dist/ir/validation/anon-type-lower-statements.d.ts +13 -0
- package/dist/ir/validation/anon-type-lower-statements.d.ts.map +1 -0
- package/dist/ir/validation/anon-type-lower-statements.js +270 -0
- package/dist/ir/validation/anon-type-lower-statements.js.map +1 -0
- package/dist/ir/validation/anon-type-lower-types.d.ts +60 -0
- package/dist/ir/validation/anon-type-lower-types.d.ts.map +1 -0
- package/dist/ir/validation/anon-type-lower-types.js +287 -0
- package/dist/ir/validation/anon-type-lower-types.js.map +1 -0
- package/dist/ir/validation/anon-type-naming.d.ts +20 -0
- package/dist/ir/validation/anon-type-naming.d.ts.map +1 -0
- package/dist/ir/validation/anon-type-naming.js +153 -0
- package/dist/ir/validation/anon-type-naming.js.map +1 -0
- package/dist/ir/validation/anon-type-shape-analysis.d.ts +13 -0
- package/dist/ir/validation/anon-type-shape-analysis.d.ts.map +1 -0
- package/dist/ir/validation/anon-type-shape-analysis.js +12 -0
- package/dist/ir/validation/anon-type-shape-analysis.js.map +1 -0
- package/dist/ir/validation/anon-type-shape-collectors.d.ts +39 -0
- package/dist/ir/validation/anon-type-shape-collectors.d.ts.map +1 -0
- package/dist/ir/validation/anon-type-shape-collectors.js +369 -0
- package/dist/ir/validation/anon-type-shape-collectors.js.map +1 -0
- package/dist/ir/validation/anon-type-shape-serialization.d.ts +38 -0
- package/dist/ir/validation/anon-type-shape-serialization.d.ts.map +1 -0
- package/dist/ir/validation/anon-type-shape-serialization.js +241 -0
- package/dist/ir/validation/anon-type-shape-serialization.js.map +1 -0
- package/dist/ir/validation/anon-type-template-inference.d.ts +12 -0
- package/dist/ir/validation/anon-type-template-inference.d.ts.map +1 -0
- package/dist/ir/validation/anon-type-template-inference.js +296 -0
- package/dist/ir/validation/anon-type-template-inference.js.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-pass.d.ts +7 -1
- package/dist/ir/validation/anonymous-type-lowering-pass.d.ts.map +1 -1
- package/dist/ir/validation/anonymous-type-lowering-pass.js +315 -1166
- package/dist/ir/validation/anonymous-type-lowering-pass.js.map +1 -1
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/basic-lowering.test.d.ts +2 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/basic-lowering.test.d.ts.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/basic-lowering.test.js +332 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/basic-lowering.test.js.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/cross-module-reuse.test.d.ts +2 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/cross-module-reuse.test.d.ts.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/cross-module-reuse.test.js +255 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/cross-module-reuse.test.js.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/structural-references.test.d.ts +2 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/structural-references.test.d.ts.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/structural-references.test.js +715 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/structural-references.test.js.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/test-helpers.d.ts +4 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/test-helpers.d.ts.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/test-helpers.js +85 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions-cases/test-helpers.js.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions.test.d.ts +3 -1
- package/dist/ir/validation/anonymous-type-lowering-regressions.test.d.ts.map +1 -1
- package/dist/ir/validation/anonymous-type-lowering-regressions.test.js +3 -120
- package/dist/ir/validation/anonymous-type-lowering-regressions.test.js.map +1 -1
- package/dist/ir/validation/arrow-return-expression-walk.d.ts +13 -0
- package/dist/ir/validation/arrow-return-expression-walk.d.ts.map +1 -0
- package/dist/ir/validation/arrow-return-expression-walk.js +224 -0
- package/dist/ir/validation/arrow-return-expression-walk.js.map +1 -0
- package/dist/ir/validation/arrow-return-finalization-pass.d.ts +3 -17
- package/dist/ir/validation/arrow-return-finalization-pass.d.ts.map +1 -1
- package/dist/ir/validation/arrow-return-finalization-pass.js +2 -418
- package/dist/ir/validation/arrow-return-finalization-pass.js.map +1 -1
- package/dist/ir/validation/arrow-return-statement-walk.d.ts +27 -0
- package/dist/ir/validation/arrow-return-statement-walk.d.ts.map +1 -0
- package/dist/ir/validation/arrow-return-statement-walk.js +206 -0
- package/dist/ir/validation/arrow-return-statement-walk.js.map +1 -0
- package/dist/ir/validation/attribute-collection/arg-extractor.d.ts +8 -2
- package/dist/ir/validation/attribute-collection/arg-extractor.d.ts.map +1 -1
- package/dist/ir/validation/attribute-collection/arg-extractor.js.map +1 -1
- package/dist/ir/validation/attribute-collection/marker-chain-parser.d.ts +21 -0
- package/dist/ir/validation/attribute-collection/marker-chain-parser.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection/marker-chain-parser.js +261 -0
- package/dist/ir/validation/attribute-collection/marker-chain-parser.js.map +1 -0
- package/dist/ir/validation/attribute-collection/marker-collection.d.ts +28 -0
- package/dist/ir/validation/attribute-collection/marker-collection.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection/marker-collection.js +343 -0
- package/dist/ir/validation/attribute-collection/marker-collection.js.map +1 -0
- package/dist/ir/validation/attribute-collection/marker-detection.d.ts +25 -0
- package/dist/ir/validation/attribute-collection/marker-detection.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection/marker-detection.js +214 -0
- package/dist/ir/validation/attribute-collection/marker-detection.js.map +1 -0
- package/dist/ir/validation/attribute-collection/marker-parser.d.ts +7 -24
- package/dist/ir/validation/attribute-collection/marker-parser.d.ts.map +1 -1
- package/dist/ir/validation/attribute-collection/marker-parser.js +7 -400
- package/dist/ir/validation/attribute-collection/marker-parser.js.map +1 -1
- package/dist/ir/validation/attribute-collection/module-rebuild.d.ts +28 -0
- package/dist/ir/validation/attribute-collection/module-rebuild.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection/module-rebuild.js +176 -0
- package/dist/ir/validation/attribute-collection/module-rebuild.js.map +1 -0
- package/dist/ir/validation/attribute-collection/orchestrator.d.ts +3 -19
- package/dist/ir/validation/attribute-collection/orchestrator.d.ts.map +1 -1
- package/dist/ir/validation/attribute-collection/orchestrator.js +2 -323
- package/dist/ir/validation/attribute-collection/orchestrator.js.map +1 -1
- package/dist/ir/validation/attribute-collection-cases/ctor-add.test.d.ts +5 -0
- package/dist/ir/validation/attribute-collection-cases/ctor-add.test.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/ctor-add.test.js +62 -0
- package/dist/ir/validation/attribute-collection-cases/ctor-add.test.js.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/error-cases.test.d.ts +5 -0
- package/dist/ir/validation/attribute-collection-cases/error-cases.test.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/error-cases.test.js +246 -0
- package/dist/ir/validation/attribute-collection-cases/error-cases.test.js.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/function-and-misc.test.d.ts +6 -0
- package/dist/ir/validation/attribute-collection-cases/function-and-misc.test.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/function-and-misc.test.js +77 -0
- package/dist/ir/validation/attribute-collection-cases/function-and-misc.test.js.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/helpers.d.ts +186 -0
- package/dist/ir/validation/attribute-collection-cases/helpers.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/helpers.js +239 -0
- package/dist/ir/validation/attribute-collection-cases/helpers.js.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/method-selector.test.d.ts +5 -0
- package/dist/ir/validation/attribute-collection-cases/method-selector.test.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/method-selector.test.js +371 -0
- package/dist/ir/validation/attribute-collection-cases/method-selector.test.js.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/prop-selector.test.d.ts +5 -0
- package/dist/ir/validation/attribute-collection-cases/prop-selector.test.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/prop-selector.test.js +209 -0
- package/dist/ir/validation/attribute-collection-cases/prop-selector.test.js.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/type-add.test.d.ts +5 -0
- package/dist/ir/validation/attribute-collection-cases/type-add.test.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection-cases/type-add.test.js +330 -0
- package/dist/ir/validation/attribute-collection-cases/type-add.test.js.map +1 -0
- package/dist/ir/validation/attribute-collection-pass.d.ts +5 -4
- package/dist/ir/validation/attribute-collection-pass.d.ts.map +1 -1
- package/dist/ir/validation/attribute-collection-pass.js +5 -4
- package/dist/ir/validation/attribute-collection-pass.js.map +1 -1
- package/dist/ir/validation/attribute-collection-pass.test.d.ts +8 -1
- package/dist/ir/validation/attribute-collection-pass.test.d.ts.map +1 -1
- package/dist/ir/validation/attribute-collection-pass.test.js +8 -1331
- package/dist/ir/validation/attribute-collection-pass.test.js.map +1 -1
- package/dist/ir/validation/call-resolution-refresh-pass.d.ts +8 -0
- package/dist/ir/validation/call-resolution-refresh-pass.d.ts.map +1 -0
- package/dist/ir/validation/call-resolution-refresh-pass.js +616 -0
- package/dist/ir/validation/call-resolution-refresh-pass.js.map +1 -0
- package/dist/ir/validation/char-validation-expressions.d.ts +13 -0
- package/dist/ir/validation/char-validation-expressions.d.ts.map +1 -0
- package/dist/ir/validation/char-validation-expressions.js +362 -0
- package/dist/ir/validation/char-validation-expressions.js.map +1 -0
- package/dist/ir/validation/char-validation-pass.d.ts +7 -22
- package/dist/ir/validation/char-validation-pass.d.ts.map +1 -1
- package/dist/ir/validation/char-validation-pass.js +6 -504
- package/dist/ir/validation/char-validation-pass.js.map +1 -1
- package/dist/ir/validation/char-validation-types.d.ts +28 -0
- package/dist/ir/validation/char-validation-types.d.ts.map +1 -0
- package/dist/ir/validation/char-validation-types.js +144 -0
- package/dist/ir/validation/char-validation-types.js.map +1 -0
- package/dist/ir/validation/index.d.ts +3 -0
- package/dist/ir/validation/index.d.ts.map +1 -1
- package/dist/ir/validation/index.js +3 -0
- package/dist/ir/validation/index.js.map +1 -1
- package/dist/ir/validation/known-builtin-reference-types.d.ts +12 -0
- package/dist/ir/validation/known-builtin-reference-types.d.ts.map +1 -0
- package/dist/ir/validation/known-builtin-reference-types.js +29 -0
- package/dist/ir/validation/known-builtin-reference-types.js.map +1 -0
- package/dist/ir/validation/numeric-classification.d.ts +105 -0
- package/dist/ir/validation/numeric-classification.d.ts.map +1 -0
- package/dist/ir/validation/numeric-classification.js +368 -0
- package/dist/ir/validation/numeric-classification.js.map +1 -0
- package/dist/ir/validation/numeric-coercion-pass.d.ts +3 -50
- package/dist/ir/validation/numeric-coercion-pass.d.ts.map +1 -1
- package/dist/ir/validation/numeric-coercion-pass.js +3 -777
- package/dist/ir/validation/numeric-coercion-pass.js.map +1 -1
- package/dist/ir/validation/numeric-expression-validation.d.ts +26 -0
- package/dist/ir/validation/numeric-expression-validation.d.ts.map +1 -0
- package/dist/ir/validation/numeric-expression-validation.js +253 -0
- package/dist/ir/validation/numeric-expression-validation.js.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/array-index-proofs.test.d.ts +11 -0
- package/dist/ir/validation/numeric-invariants-cases/array-index-proofs.test.d.ts.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/array-index-proofs.test.js +185 -0
- package/dist/ir/validation/numeric-invariants-cases/array-index-proofs.test.js.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/arrow-function-proofs.test.d.ts +16 -0
- package/dist/ir/validation/numeric-invariants-cases/arrow-function-proofs.test.d.ts.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/arrow-function-proofs.test.js +364 -0
- package/dist/ir/validation/numeric-invariants-cases/arrow-function-proofs.test.js.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/binary-promotion.test.d.ts +9 -0
- package/dist/ir/validation/numeric-invariants-cases/binary-promotion.test.d.ts.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/binary-promotion.test.js +119 -0
- package/dist/ir/validation/numeric-invariants-cases/binary-promotion.test.js.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/helpers.d.ts +60 -0
- package/dist/ir/validation/numeric-invariants-cases/helpers.d.ts.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/helpers.js +163 -0
- package/dist/ir/validation/numeric-invariants-cases/helpers.js.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/literal-range-validation.test.d.ts +8 -0
- package/dist/ir/validation/numeric-invariants-cases/literal-range-validation.test.d.ts.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/literal-range-validation.test.js +110 -0
- package/dist/ir/validation/numeric-invariants-cases/literal-range-validation.test.js.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/narrowing-intent.test.d.ts +12 -0
- package/dist/ir/validation/numeric-invariants-cases/narrowing-intent.test.d.ts.map +1 -0
- package/dist/ir/validation/numeric-invariants-cases/narrowing-intent.test.js +188 -0
- package/dist/ir/validation/numeric-invariants-cases/narrowing-intent.test.js.map +1 -0
- package/dist/ir/validation/numeric-invariants.test.d.ts +5 -14
- package/dist/ir/validation/numeric-invariants.test.d.ts.map +1 -1
- package/dist/ir/validation/numeric-invariants.test.js +5 -932
- package/dist/ir/validation/numeric-invariants.test.js.map +1 -1
- package/dist/ir/validation/numeric-proof-analysis.d.ts +9 -0
- package/dist/ir/validation/numeric-proof-analysis.d.ts.map +1 -0
- package/dist/ir/validation/numeric-proof-analysis.js +8 -0
- package/dist/ir/validation/numeric-proof-analysis.js.map +1 -0
- package/dist/ir/validation/numeric-proof-expression-walk.d.ts +18 -0
- package/dist/ir/validation/numeric-proof-expression-walk.d.ts.map +1 -0
- package/dist/ir/validation/numeric-proof-expression-walk.js +331 -0
- package/dist/ir/validation/numeric-proof-expression-walk.js.map +1 -0
- package/dist/ir/validation/numeric-proof-guard-facts.d.ts +29 -0
- package/dist/ir/validation/numeric-proof-guard-facts.d.ts.map +1 -0
- package/dist/ir/validation/numeric-proof-guard-facts.js +213 -0
- package/dist/ir/validation/numeric-proof-guard-facts.js.map +1 -0
- package/dist/ir/validation/numeric-proof-inference.d.ts +33 -0
- package/dist/ir/validation/numeric-proof-inference.d.ts.map +1 -0
- package/dist/ir/validation/numeric-proof-inference.js +222 -0
- package/dist/ir/validation/numeric-proof-inference.js.map +1 -0
- package/dist/ir/validation/numeric-proof-pass.d.ts +5 -25
- package/dist/ir/validation/numeric-proof-pass.d.ts.map +1 -1
- package/dist/ir/validation/numeric-proof-pass.js +5 -1164
- package/dist/ir/validation/numeric-proof-pass.js.map +1 -1
- package/dist/ir/validation/numeric-proof-proving.d.ts +21 -0
- package/dist/ir/validation/numeric-proof-proving.d.ts.map +1 -0
- package/dist/ir/validation/numeric-proof-proving.js +261 -0
- package/dist/ir/validation/numeric-proof-proving.js.map +1 -0
- package/dist/ir/validation/numeric-proof-statement-walk.d.ts +37 -0
- package/dist/ir/validation/numeric-proof-statement-walk.d.ts.map +1 -0
- package/dist/ir/validation/numeric-proof-statement-walk.js +295 -0
- package/dist/ir/validation/numeric-proof-statement-walk.js.map +1 -0
- package/dist/ir/validation/numeric-proof-walk.d.ts +10 -0
- package/dist/ir/validation/numeric-proof-walk.d.ts.map +1 -0
- package/dist/ir/validation/numeric-proof-walk.js +9 -0
- package/dist/ir/validation/numeric-proof-walk.js.map +1 -0
- package/dist/ir/validation/numeric-statement-processing.d.ts +39 -0
- package/dist/ir/validation/numeric-statement-processing.d.ts.map +1 -0
- package/dist/ir/validation/numeric-statement-processing.js +229 -0
- package/dist/ir/validation/numeric-statement-processing.js.map +1 -0
- package/dist/ir/validation/numeric-validation.d.ts +13 -0
- package/dist/ir/validation/numeric-validation.d.ts.map +1 -0
- package/dist/ir/validation/numeric-validation.js +12 -0
- package/dist/ir/validation/numeric-validation.js.map +1 -0
- package/dist/ir/validation/overload-collection-cases/basic.test.d.ts +2 -0
- package/dist/ir/validation/overload-collection-cases/basic.test.d.ts.map +1 -0
- package/dist/ir/validation/overload-collection-cases/basic.test.js +103 -0
- package/dist/ir/validation/overload-collection-cases/basic.test.js.map +1 -0
- package/dist/ir/validation/overload-collection-cases/consistency.test.d.ts +2 -0
- package/dist/ir/validation/overload-collection-cases/consistency.test.d.ts.map +1 -0
- package/dist/ir/validation/overload-collection-cases/consistency.test.js +79 -0
- package/dist/ir/validation/overload-collection-cases/consistency.test.js.map +1 -0
- package/dist/ir/validation/overload-collection-cases/error-cases.test.d.ts +2 -0
- package/dist/ir/validation/overload-collection-cases/error-cases.test.d.ts.map +1 -0
- package/dist/ir/validation/overload-collection-cases/error-cases.test.js +24 -0
- package/dist/ir/validation/overload-collection-cases/error-cases.test.js.map +1 -0
- package/dist/ir/validation/overload-collection-cases/helpers.d.ts +107 -0
- package/dist/ir/validation/overload-collection-cases/helpers.d.ts.map +1 -0
- package/dist/ir/validation/overload-collection-cases/helpers.js +142 -0
- package/dist/ir/validation/overload-collection-cases/helpers.js.map +1 -0
- package/dist/ir/validation/overload-collection-pass.d.ts +16 -0
- package/dist/ir/validation/overload-collection-pass.d.ts.map +1 -0
- package/dist/ir/validation/overload-collection-pass.js +930 -0
- package/dist/ir/validation/overload-collection-pass.js.map +1 -0
- package/dist/ir/validation/overload-collection-pass.test.d.ts +4 -0
- package/dist/ir/validation/overload-collection-pass.test.d.ts.map +1 -0
- package/dist/ir/validation/overload-collection-pass.test.js +4 -0
- package/dist/ir/validation/overload-collection-pass.test.js.map +1 -0
- package/dist/ir/validation/overload-family-consistency-pass.d.ts +9 -0
- package/dist/ir/validation/overload-family-consistency-pass.d.ts.map +1 -0
- package/dist/ir/validation/overload-family-consistency-pass.js +161 -0
- package/dist/ir/validation/overload-family-consistency-pass.js.map +1 -0
- package/dist/ir/validation/rest-type-synthesis-helpers.d.ts +52 -0
- package/dist/ir/validation/rest-type-synthesis-helpers.d.ts.map +1 -0
- package/dist/ir/validation/rest-type-synthesis-helpers.js +250 -0
- package/dist/ir/validation/rest-type-synthesis-helpers.js.map +1 -0
- package/dist/ir/validation/rest-type-synthesis-pass.d.ts +6 -20
- package/dist/ir/validation/rest-type-synthesis-pass.d.ts.map +1 -1
- package/dist/ir/validation/rest-type-synthesis-pass.js +5 -461
- package/dist/ir/validation/rest-type-synthesis-pass.js.map +1 -1
- package/dist/ir/validation/rest-type-synthesis-processing.d.ts +14 -0
- package/dist/ir/validation/rest-type-synthesis-processing.d.ts.map +1 -0
- package/dist/ir/validation/rest-type-synthesis-processing.js +220 -0
- package/dist/ir/validation/rest-type-synthesis-processing.js.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/any-type-and-primitives.test.d.ts +12 -0
- package/dist/ir/validation/soundness-gate-cases/any-type-and-primitives.test.d.ts.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/any-type-and-primitives.test.js +99 -0
- package/dist/ir/validation/soundness-gate-cases/any-type-and-primitives.test.js.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/computed-member-access.test.d.ts +10 -0
- package/dist/ir/validation/soundness-gate-cases/computed-member-access.test.d.ts.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/computed-member-access.test.js +139 -0
- package/dist/ir/validation/soundness-gate-cases/computed-member-access.test.js.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/inference-diagnostics.test.d.ts +10 -0
- package/dist/ir/validation/soundness-gate-cases/inference-diagnostics.test.d.ts.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/inference-diagnostics.test.js +123 -0
- package/dist/ir/validation/soundness-gate-cases/inference-diagnostics.test.js.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/reference-type-resolution.test.d.ts +15 -0
- package/dist/ir/validation/soundness-gate-cases/reference-type-resolution.test.d.ts.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/reference-type-resolution.test.js +292 -0
- package/dist/ir/validation/soundness-gate-cases/reference-type-resolution.test.js.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/test-helpers.d.ts +12 -0
- package/dist/ir/validation/soundness-gate-cases/test-helpers.d.ts.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/test-helpers.js +36 -0
- package/dist/ir/validation/soundness-gate-cases/test-helpers.js.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/type-params-and-intrinsics.test.d.ts +11 -0
- package/dist/ir/validation/soundness-gate-cases/type-params-and-intrinsics.test.d.ts.map +1 -0
- package/dist/ir/validation/soundness-gate-cases/type-params-and-intrinsics.test.js +249 -0
- package/dist/ir/validation/soundness-gate-cases/type-params-and-intrinsics.test.js.map +1 -0
- package/dist/ir/validation/soundness-gate-expression-validation.d.ts +3 -0
- package/dist/ir/validation/soundness-gate-expression-validation.d.ts.map +1 -0
- package/dist/ir/validation/soundness-gate-expression-validation.js +205 -0
- package/dist/ir/validation/soundness-gate-expression-validation.js.map +1 -0
- package/dist/ir/validation/soundness-gate-shared.d.ts +26 -0
- package/dist/ir/validation/soundness-gate-shared.d.ts.map +1 -0
- package/dist/ir/validation/soundness-gate-shared.js +46 -0
- package/dist/ir/validation/soundness-gate-shared.js.map +1 -0
- package/dist/ir/validation/soundness-gate-statement-validation.d.ts +5 -0
- package/dist/ir/validation/soundness-gate-statement-validation.d.ts.map +1 -0
- package/dist/ir/validation/soundness-gate-statement-validation.js +199 -0
- package/dist/ir/validation/soundness-gate-statement-validation.js.map +1 -0
- package/dist/ir/validation/soundness-gate-type-validation.d.ts +9 -0
- package/dist/ir/validation/soundness-gate-type-validation.d.ts.map +1 -0
- package/dist/ir/validation/soundness-gate-type-validation.js +149 -0
- package/dist/ir/validation/soundness-gate-type-validation.js.map +1 -0
- package/dist/ir/validation/soundness-gate.d.ts +2 -18
- package/dist/ir/validation/soundness-gate.d.ts.map +1 -1
- package/dist/ir/validation/soundness-gate.js +15 -608
- package/dist/ir/validation/soundness-gate.js.map +1 -1
- package/dist/ir/validation/soundness-gate.test.d.ts +5 -12
- package/dist/ir/validation/soundness-gate.test.d.ts.map +1 -1
- package/dist/ir/validation/soundness-gate.test.js +5 -696
- package/dist/ir/validation/soundness-gate.test.js.map +1 -1
- package/dist/ir/validation/virtual-marking-pass.d.ts +10 -2
- package/dist/ir/validation/virtual-marking-pass.d.ts.map +1 -1
- package/dist/ir/validation/virtual-marking-pass.js +347 -59
- package/dist/ir/validation/virtual-marking-pass.js.map +1 -1
- package/dist/ir/validation/virtual-marking-pass.test.d.ts +2 -0
- package/dist/ir/validation/virtual-marking-pass.test.d.ts.map +1 -0
- package/dist/ir/validation/virtual-marking-pass.test.js +314 -0
- package/dist/ir/validation/virtual-marking-pass.test.js.map +1 -0
- package/dist/ir/validation/yield-expression-lowering.d.ts +13 -0
- package/dist/ir/validation/yield-expression-lowering.d.ts.map +1 -0
- package/dist/ir/validation/yield-expression-lowering.js +13 -0
- package/dist/ir/validation/yield-expression-lowering.js.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/assignment-yield.test.d.ts +14 -0
- package/dist/ir/validation/yield-lowering-cases/assignment-yield.test.d.ts.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/assignment-yield.test.js +383 -0
- package/dist/ir/validation/yield-lowering-cases/assignment-yield.test.js.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/basic-yield.test.d.ts +12 -0
- package/dist/ir/validation/yield-lowering-cases/basic-yield.test.d.ts.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/basic-yield.test.js +120 -0
- package/dist/ir/validation/yield-lowering-cases/basic-yield.test.js.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/control-flow.test.d.ts +13 -0
- package/dist/ir/validation/yield-lowering-cases/control-flow.test.d.ts.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/control-flow.test.js +284 -0
- package/dist/ir/validation/yield-lowering-cases/control-flow.test.js.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/destructuring-and-unsupported.test.d.ts +13 -0
- package/dist/ir/validation/yield-lowering-cases/destructuring-and-unsupported.test.d.ts.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/destructuring-and-unsupported.test.js +334 -0
- package/dist/ir/validation/yield-lowering-cases/destructuring-and-unsupported.test.js.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/for-loop-initializer.test.d.ts +16 -0
- package/dist/ir/validation/yield-lowering-cases/for-loop-initializer.test.d.ts.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/for-loop-initializer.test.js +321 -0
- package/dist/ir/validation/yield-lowering-cases/for-loop-initializer.test.js.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/helpers.d.ts +32 -0
- package/dist/ir/validation/yield-lowering-cases/helpers.d.ts.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/helpers.js +76 -0
- package/dist/ir/validation/yield-lowering-cases/helpers.js.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/nested-yield-in-statements.test.d.ts +13 -0
- package/dist/ir/validation/yield-lowering-cases/nested-yield-in-statements.test.d.ts.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/nested-yield-in-statements.test.js +221 -0
- package/dist/ir/validation/yield-lowering-cases/nested-yield-in-statements.test.js.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/non-generator-and-modules.test.d.ts +11 -0
- package/dist/ir/validation/yield-lowering-cases/non-generator-and-modules.test.d.ts.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/non-generator-and-modules.test.js +136 -0
- package/dist/ir/validation/yield-lowering-cases/non-generator-and-modules.test.js.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/pipeline-contract-and-return.test.d.ts +14 -0
- package/dist/ir/validation/yield-lowering-cases/pipeline-contract-and-return.test.d.ts.map +1 -0
- package/dist/ir/validation/yield-lowering-cases/pipeline-contract-and-return.test.js +219 -0
- package/dist/ir/validation/yield-lowering-cases/pipeline-contract-and-return.test.js.map +1 -0
- package/dist/ir/validation/yield-lowering-helpers.d.ts +63 -0
- package/dist/ir/validation/yield-lowering-helpers.d.ts.map +1 -0
- package/dist/ir/validation/yield-lowering-helpers.js +240 -0
- package/dist/ir/validation/yield-lowering-helpers.js.map +1 -0
- package/dist/ir/validation/yield-lowering-pass.d.ts +7 -1
- package/dist/ir/validation/yield-lowering-pass.d.ts.map +1 -1
- package/dist/ir/validation/yield-lowering-pass.js +8 -1418
- package/dist/ir/validation/yield-lowering-pass.js.map +1 -1
- package/dist/ir/validation/yield-lowering-pass.test.d.ts +8 -11
- package/dist/ir/validation/yield-lowering-pass.test.d.ts.map +1 -1
- package/dist/ir/validation/yield-lowering-pass.test.js +8 -1975
- package/dist/ir/validation/yield-lowering-pass.test.js.map +1 -1
- package/dist/ir/validation/yield-main-expression-lowering.d.ts +20 -0
- package/dist/ir/validation/yield-main-expression-lowering.d.ts.map +1 -0
- package/dist/ir/validation/yield-main-expression-lowering.js +381 -0
- package/dist/ir/validation/yield-main-expression-lowering.js.map +1 -0
- package/dist/ir/validation/yield-member-access-lowering.d.ts +21 -0
- package/dist/ir/validation/yield-member-access-lowering.d.ts.map +1 -0
- package/dist/ir/validation/yield-member-access-lowering.js +58 -0
- package/dist/ir/validation/yield-member-access-lowering.js.map +1 -0
- package/dist/ir/validation/yield-module-processing.d.ts +25 -0
- package/dist/ir/validation/yield-module-processing.d.ts.map +1 -0
- package/dist/ir/validation/yield-module-processing.js +180 -0
- package/dist/ir/validation/yield-module-processing.js.map +1 -0
- package/dist/ir/validation/yield-statement-loops.d.ts +51 -0
- package/dist/ir/validation/yield-statement-loops.d.ts.map +1 -0
- package/dist/ir/validation/yield-statement-loops.js +344 -0
- package/dist/ir/validation/yield-statement-loops.js.map +1 -0
- package/dist/ir/validation/yield-statement-lowering.d.ts +18 -0
- package/dist/ir/validation/yield-statement-lowering.d.ts.map +1 -0
- package/dist/ir/validation/yield-statement-lowering.js +48 -0
- package/dist/ir/validation/yield-statement-lowering.js.map +1 -0
- package/dist/ir/validation/yield-statement-simple.d.ts +33 -0
- package/dist/ir/validation/yield-statement-simple.d.ts.map +1 -0
- package/dist/ir/validation/yield-statement-simple.js +268 -0
- package/dist/ir/validation/yield-statement-simple.js.map +1 -0
- package/dist/program/binding-loader.d.ts.map +1 -1
- package/dist/program/binding-loader.js +1099 -6
- package/dist/program/binding-loader.js.map +1 -1
- package/dist/program/binding-payload-invariants.test.d.ts +2 -0
- package/dist/program/binding-payload-invariants.test.d.ts.map +1 -0
- package/dist/program/binding-payload-invariants.test.js +55 -0
- package/dist/program/binding-payload-invariants.test.js.map +1 -0
- package/dist/program/binding-registry-loading.d.ts +51 -0
- package/dist/program/binding-registry-loading.d.ts.map +1 -0
- package/dist/program/binding-registry-loading.js +816 -0
- package/dist/program/binding-registry-loading.js.map +1 -0
- package/dist/program/binding-registry-resolution-extension.d.ts +26 -0
- package/dist/program/binding-registry-resolution-extension.d.ts.map +1 -0
- package/dist/program/binding-registry-resolution-extension.js +161 -0
- package/dist/program/binding-registry-resolution-extension.js.map +1 -0
- package/dist/program/binding-registry-resolution-member.d.ts +46 -0
- package/dist/program/binding-registry-resolution-member.d.ts.map +1 -0
- package/dist/program/binding-registry-resolution-member.js +252 -0
- package/dist/program/binding-registry-resolution-member.js.map +1 -0
- package/dist/program/binding-registry-resolution.d.ts +13 -0
- package/dist/program/binding-registry-resolution.d.ts.map +1 -0
- package/dist/program/binding-registry-resolution.js +12 -0
- package/dist/program/binding-registry-resolution.js.map +1 -0
- package/dist/program/binding-registry.d.ts +34 -22
- package/dist/program/binding-registry.d.ts.map +1 -1
- package/dist/program/binding-registry.js +111 -562
- package/dist/program/binding-registry.js.map +1 -1
- package/dist/program/binding-types.d.ts +34 -3
- package/dist/program/binding-types.d.ts.map +1 -1
- package/dist/program/binding-types.js +82 -6
- package/dist/program/binding-types.js.map +1 -1
- package/dist/program/bindings-cases/dotnet-payload-boundaries.test.d.ts +2 -0
- package/dist/program/bindings-cases/dotnet-payload-boundaries.test.d.ts.map +1 -0
- package/dist/program/bindings-cases/dotnet-payload-boundaries.test.js +115 -0
- package/dist/program/bindings-cases/dotnet-payload-boundaries.test.js.map +1 -0
- package/dist/program/bindings-cases/hierarchical-and-type-semantics.test.d.ts +6 -0
- package/dist/program/bindings-cases/hierarchical-and-type-semantics.test.d.ts.map +1 -0
- package/dist/program/bindings-cases/hierarchical-and-type-semantics.test.js +573 -0
- package/dist/program/bindings-cases/hierarchical-and-type-semantics.test.js.map +1 -0
- package/dist/program/bindings-cases/load-bindings.test.d.ts +7 -0
- package/dist/program/bindings-cases/load-bindings.test.d.ts.map +1 -0
- package/dist/program/bindings-cases/load-bindings.test.js +545 -0
- package/dist/program/bindings-cases/load-bindings.test.js.map +1 -0
- package/dist/program/bindings-cases/registry-basics.test.d.ts +6 -0
- package/dist/program/bindings-cases/registry-basics.test.d.ts.map +1 -0
- package/dist/program/bindings-cases/registry-basics.test.js +201 -0
- package/dist/program/bindings-cases/registry-basics.test.js.map +1 -0
- package/dist/program/bindings-cases/registry-member-resolution.test.d.ts +8 -0
- package/dist/program/bindings-cases/registry-member-resolution.test.d.ts.map +1 -0
- package/dist/program/bindings-cases/registry-member-resolution.test.js +301 -0
- package/dist/program/bindings-cases/registry-member-resolution.test.js.map +1 -0
- package/dist/program/bindings.d.ts +2 -1
- package/dist/program/bindings.d.ts.map +1 -1
- package/dist/program/bindings.js +1 -0
- package/dist/program/bindings.js.map +1 -1
- package/dist/program/bindings.test.d.ts +12 -2
- package/dist/program/bindings.test.d.ts.map +1 -1
- package/dist/program/bindings.test.js +12 -989
- package/dist/program/bindings.test.js.map +1 -1
- package/dist/program/core-declarations.d.ts +16 -0
- package/dist/program/core-declarations.d.ts.map +1 -0
- package/dist/program/core-declarations.js +126 -0
- package/dist/program/core-declarations.js.map +1 -0
- package/dist/program/creation-cases/authoritative-type-roots.test.d.ts +6 -0
- package/dist/program/creation-cases/authoritative-type-roots.test.d.ts.map +1 -0
- package/dist/program/creation-cases/authoritative-type-roots.test.js +136 -0
- package/dist/program/creation-cases/authoritative-type-roots.test.js.map +1 -0
- package/dist/program/creation-cases/compiler-options.test.d.ts +5 -0
- package/dist/program/creation-cases/compiler-options.test.d.ts.map +1 -0
- package/dist/program/creation-cases/compiler-options.test.js +77 -0
- package/dist/program/creation-cases/compiler-options.test.js.map +1 -0
- package/dist/program/creation-cases/core-type-checking.test.d.ts +6 -0
- package/dist/program/creation-cases/core-type-checking.test.d.ts.map +1 -0
- package/dist/program/creation-cases/core-type-checking.test.js +66 -0
- package/dist/program/creation-cases/core-type-checking.test.js.map +1 -0
- package/dist/program/creation-cases/js-surface-globals.test.d.ts +6 -0
- package/dist/program/creation-cases/js-surface-globals.test.d.ts.map +1 -0
- package/dist/program/creation-cases/js-surface-globals.test.js +236 -0
- package/dist/program/creation-cases/js-surface-globals.test.js.map +1 -0
- package/dist/program/creation-cases/module-bindings.test.d.ts +2 -0
- package/dist/program/creation-cases/module-bindings.test.d.ts.map +1 -0
- package/dist/program/creation-cases/module-bindings.test.js +253 -0
- package/dist/program/creation-cases/module-bindings.test.js.map +1 -0
- package/dist/program/creation-cases/package-resolution.test.d.ts +6 -0
- package/dist/program/creation-cases/package-resolution.test.d.ts.map +1 -0
- package/dist/program/creation-cases/package-resolution.test.js +116 -0
- package/dist/program/creation-cases/package-resolution.test.js.map +1 -0
- package/dist/program/creation-cases/surface-isolation.test.d.ts +6 -0
- package/dist/program/creation-cases/surface-isolation.test.d.ts.map +1 -0
- package/dist/program/creation-cases/surface-isolation.test.js +196 -0
- package/dist/program/creation-cases/surface-isolation.test.js.map +1 -0
- package/dist/program/creation-cases/test-package-helpers.d.ts +6 -0
- package/dist/program/creation-cases/test-package-helpers.d.ts.map +1 -0
- package/dist/program/creation-cases/test-package-helpers.js +26 -0
- package/dist/program/creation-cases/test-package-helpers.js.map +1 -0
- package/dist/program/creation.d.ts +3 -14
- package/dist/program/creation.d.ts.map +1 -1
- package/dist/program/creation.js +3 -780
- package/dist/program/creation.js.map +1 -1
- package/dist/program/creation.test.d.ts +10 -2
- package/dist/program/creation.test.d.ts.map +1 -1
- package/dist/program/creation.test.js +10 -932
- package/dist/program/creation.test.js.map +1 -1
- package/dist/program/declaration-module-aliases.d.ts +13 -0
- package/dist/program/declaration-module-aliases.d.ts.map +1 -0
- package/dist/program/declaration-module-aliases.js +144 -0
- package/dist/program/declaration-module-aliases.js.map +1 -0
- package/dist/program/dependency-graph.d.ts +3 -1
- package/dist/program/dependency-graph.d.ts.map +1 -1
- package/dist/program/dependency-graph.js +211 -23
- package/dist/program/dependency-graph.js.map +1 -1
- package/dist/program/dependency-graph.test.js +307 -85
- package/dist/program/dependency-graph.test.js.map +1 -1
- package/dist/program/diagnostics.d.ts +1 -1
- package/dist/program/diagnostics.d.ts.map +1 -1
- package/dist/program/diagnostics.js +2 -48
- package/dist/program/diagnostics.js.map +1 -1
- package/dist/program/diagnostics.test.js +9 -24
- package/dist/program/diagnostics.test.js.map +1 -1
- package/dist/program/dotnet-binding-payload.d.ts +12 -0
- package/dist/program/dotnet-binding-payload.d.ts.map +1 -0
- package/dist/program/dotnet-binding-payload.js +71 -0
- package/dist/program/dotnet-binding-payload.js.map +1 -0
- package/dist/program/fixture-fast-coverage.test.d.ts +2 -0
- package/dist/program/fixture-fast-coverage.test.d.ts.map +1 -0
- package/dist/program/fixture-fast-coverage.test.js +225 -0
- package/dist/program/fixture-fast-coverage.test.js.map +1 -0
- package/dist/program/index.d.ts +1 -1
- package/dist/program/index.d.ts.map +1 -1
- package/dist/program/index.js +1 -1
- package/dist/program/index.js.map +1 -1
- package/dist/program/json-deserialize-overload-resolution.test.d.ts +2 -0
- package/dist/program/json-deserialize-overload-resolution.test.d.ts.map +1 -0
- package/dist/program/json-deserialize-overload-resolution.test.js +57 -0
- package/dist/program/json-deserialize-overload-resolution.test.js.map +1 -0
- package/dist/program/metadata.d.ts.map +1 -1
- package/dist/program/metadata.js +24 -8
- package/dist/program/metadata.js.map +1 -1
- package/dist/program/metadata.test.js +30 -82
- package/dist/program/metadata.test.js.map +1 -1
- package/dist/program/module-resolution.d.ts +29 -0
- package/dist/program/module-resolution.d.ts.map +1 -0
- package/dist/program/module-resolution.js +257 -0
- package/dist/program/module-resolution.js.map +1 -0
- package/dist/program/package-roots.d.ts +3 -1
- package/dist/program/package-roots.d.ts.map +1 -1
- package/dist/program/package-roots.js +159 -21
- package/dist/program/package-roots.js.map +1 -1
- package/dist/program/package-roots.test.js +81 -25
- package/dist/program/package-roots.test.js.map +1 -1
- package/dist/program/program-assembly.d.ts +12 -0
- package/dist/program/program-assembly.d.ts.map +1 -0
- package/dist/program/program-assembly.js +409 -0
- package/dist/program/program-assembly.js.map +1 -0
- package/dist/program/program-factory.d.ts +9 -0
- package/dist/program/program-factory.d.ts.map +1 -0
- package/dist/program/program-factory.js +9 -0
- package/dist/program/program-factory.js.map +1 -0
- package/dist/program/program-input-discovery.d.ts +19 -0
- package/dist/program/program-input-discovery.d.ts.map +1 -0
- package/dist/program/program-input-discovery.js +379 -0
- package/dist/program/program-input-discovery.js.map +1 -0
- package/dist/program/program-input-discovery.test.d.ts +2 -0
- package/dist/program/program-input-discovery.test.d.ts.map +1 -0
- package/dist/program/program-input-discovery.test.js +342 -0
- package/dist/program/program-input-discovery.test.js.map +1 -0
- package/dist/program/source-binding-imports.d.ts +7 -0
- package/dist/program/source-binding-imports.d.ts.map +1 -0
- package/dist/program/source-binding-imports.js +80 -0
- package/dist/program/source-binding-imports.js.map +1 -0
- package/dist/program/source-binding-imports.test.d.ts +2 -0
- package/dist/program/source-binding-imports.test.d.ts.map +1 -0
- package/dist/program/source-binding-imports.test.js +58 -0
- package/dist/program/source-binding-imports.test.js.map +1 -0
- package/dist/program/source-file-identity.d.ts +13 -0
- package/dist/program/source-file-identity.d.ts.map +1 -0
- package/dist/program/source-file-identity.js +127 -0
- package/dist/program/source-file-identity.js.map +1 -0
- package/dist/program/source-package-metadata.d.ts +14 -0
- package/dist/program/source-package-metadata.d.ts.map +1 -0
- package/dist/program/source-package-metadata.js +227 -0
- package/dist/program/source-package-metadata.js.map +1 -0
- package/dist/program/tsbindgen-instance-receiver-substitution.test.d.ts +2 -0
- package/dist/program/tsbindgen-instance-receiver-substitution.test.d.ts.map +1 -0
- package/dist/program/tsbindgen-instance-receiver-substitution.test.js +194 -0
- package/dist/program/tsbindgen-instance-receiver-substitution.test.js.map +1 -0
- package/dist/program/types.d.ts +3 -2
- package/dist/program/types.d.ts.map +1 -1
- package/dist/program/xunit-equal-overload-resolution.test.d.ts +2 -0
- package/dist/program/xunit-equal-overload-resolution.test.d.ts.map +1 -0
- package/dist/program/xunit-equal-overload-resolution.test.js +205 -0
- package/dist/program/xunit-equal-overload-resolution.test.js.map +1 -0
- package/dist/program.d.ts +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/resolver/clr-bindings-package-resolution.d.ts +28 -0
- package/dist/resolver/clr-bindings-package-resolution.d.ts.map +1 -0
- package/dist/resolver/clr-bindings-package-resolution.js +120 -0
- package/dist/resolver/clr-bindings-package-resolution.js.map +1 -0
- package/dist/resolver/clr-bindings-resolve-logic.d.ts +40 -0
- package/dist/resolver/clr-bindings-resolve-logic.d.ts.map +1 -0
- package/dist/resolver/clr-bindings-resolve-logic.js +192 -0
- package/dist/resolver/clr-bindings-resolve-logic.js.map +1 -0
- package/dist/resolver/clr-bindings-resolver.d.ts +9 -69
- package/dist/resolver/clr-bindings-resolver.d.ts.map +1 -1
- package/dist/resolver/clr-bindings-resolver.js +4 -436
- package/dist/resolver/clr-bindings-resolver.js.map +1 -1
- package/dist/resolver/dynamic-import.test.js +20 -11
- package/dist/resolver/dynamic-import.test.js.map +1 -1
- package/dist/resolver/import-resolution.d.ts +3 -0
- package/dist/resolver/import-resolution.d.ts.map +1 -1
- package/dist/resolver/import-resolution.js +120 -33
- package/dist/resolver/import-resolution.js.map +1 -1
- package/dist/resolver/source-package-resolution.d.ts +18 -0
- package/dist/resolver/source-package-resolution.d.ts.map +1 -1
- package/dist/resolver/source-package-resolution.js +141 -14
- package/dist/resolver/source-package-resolution.js.map +1 -1
- package/dist/resolver/source-package-resolution.test.js +27 -52
- package/dist/resolver/source-package-resolution.test.js.map +1 -1
- package/dist/resolver-cases/namespace-and-classname.test.d.ts +5 -0
- package/dist/resolver-cases/namespace-and-classname.test.d.ts.map +1 -0
- package/dist/resolver-cases/namespace-and-classname.test.js +32 -0
- package/dist/resolver-cases/namespace-and-classname.test.js.map +1 -0
- package/dist/resolver-cases/resolve-import.test.d.ts +5 -0
- package/dist/resolver-cases/resolve-import.test.d.ts.map +1 -0
- package/dist/resolver-cases/resolve-import.test.js +460 -0
- package/dist/resolver-cases/resolve-import.test.js.map +1 -0
- package/dist/resolver.test.d.ts +2 -4
- package/dist/resolver.test.d.ts.map +1 -1
- package/dist/resolver.test.js +2 -289
- package/dist/resolver.test.js.map +1 -1
- package/dist/surface/profiles.d.ts +1 -1
- package/dist/surface/profiles.d.ts.map +1 -1
- package/dist/surface/profiles.js +146 -53
- package/dist/surface/profiles.js.map +1 -1
- package/dist/surface/profiles.test.js +97 -108
- package/dist/surface/profiles.test.js.map +1 -1
- package/dist/testing/filesystem-fixtures.d.ts +7 -0
- package/dist/testing/filesystem-fixtures.d.ts.map +1 -0
- package/dist/testing/filesystem-fixtures.js +80 -0
- package/dist/testing/filesystem-fixtures.js.map +1 -0
- package/dist/types/diagnostic.d.ts +1 -1
- package/dist/types/diagnostic.d.ts.map +1 -1
- package/dist/types/diagnostic.js.map +1 -1
- package/dist/validation/contextual-type-analysis.d.ts +12 -0
- package/dist/validation/contextual-type-analysis.d.ts.map +1 -0
- package/dist/validation/contextual-type-analysis.js +11 -0
- package/dist/validation/contextual-type-analysis.js.map +1 -0
- package/dist/validation/contextual-type-checks.d.ts +35 -0
- package/dist/validation/contextual-type-checks.d.ts.map +1 -0
- package/dist/validation/contextual-type-checks.js +214 -0
- package/dist/validation/contextual-type-checks.js.map +1 -0
- package/dist/validation/exports.d.ts.map +1 -1
- package/dist/validation/exports.js +14 -15
- package/dist/validation/exports.js.map +1 -1
- package/dist/validation/features-cases/promise-chaining.test.d.ts +2 -0
- package/dist/validation/features-cases/promise-chaining.test.d.ts.map +1 -0
- package/dist/validation/features-cases/promise-chaining.test.js +113 -0
- package/dist/validation/features-cases/promise-chaining.test.js.map +1 -0
- package/dist/validation/features-cases/test-helpers.d.ts +11 -0
- package/dist/validation/features-cases/test-helpers.d.ts.map +1 -0
- package/dist/validation/features-cases/test-helpers.js +125 -0
- package/dist/validation/features-cases/test-helpers.js.map +1 -0
- package/dist/validation/features-cases/tsn2001-unsupported-syntax.test.d.ts +2 -0
- package/dist/validation/features-cases/tsn2001-unsupported-syntax.test.d.ts.map +1 -0
- package/dist/validation/features-cases/tsn2001-unsupported-syntax.test.js +158 -0
- package/dist/validation/features-cases/tsn2001-unsupported-syntax.test.js.map +1 -0
- package/dist/validation/features-cases/tsn5001-function-length.test.d.ts +2 -0
- package/dist/validation/features-cases/tsn5001-function-length.test.d.ts.map +1 -0
- package/dist/validation/features-cases/tsn5001-function-length.test.js +104 -0
- package/dist/validation/features-cases/tsn5001-function-length.test.js.map +1 -0
- package/dist/validation/features.d.ts.map +1 -1
- package/dist/validation/features.js +223 -0
- package/dist/validation/features.js.map +1 -1
- package/dist/validation/features.test.d.ts +3 -1
- package/dist/validation/features.test.d.ts.map +1 -1
- package/dist/validation/features.test.js +3 -386
- package/dist/validation/features.test.js.map +1 -1
- package/dist/validation/imports.d.ts.map +1 -1
- package/dist/validation/imports.js +37 -3
- package/dist/validation/imports.js.map +1 -1
- package/dist/validation/imports.test.js +45 -9
- package/dist/validation/imports.test.js.map +1 -1
- package/dist/validation/static-safety-arrow-rules.d.ts +11 -0
- package/dist/validation/static-safety-arrow-rules.d.ts.map +1 -0
- package/dist/validation/static-safety-arrow-rules.js +54 -0
- package/dist/validation/static-safety-arrow-rules.js.map +1 -0
- package/dist/validation/static-safety-dictionary-keys.d.ts +10 -0
- package/dist/validation/static-safety-dictionary-keys.d.ts.map +1 -0
- package/dist/validation/static-safety-dictionary-keys.js +32 -0
- package/dist/validation/static-safety-dictionary-keys.js.map +1 -0
- package/dist/validation/static-safety-rules.d.ts +27 -0
- package/dist/validation/static-safety-rules.d.ts.map +1 -0
- package/dist/validation/static-safety-rules.js +231 -0
- package/dist/validation/static-safety-rules.js.map +1 -0
- package/dist/validation/static-safety.d.ts +4 -7
- package/dist/validation/static-safety.d.ts.map +1 -1
- package/dist/validation/static-safety.js +3 -673
- package/dist/validation/static-safety.js.map +1 -1
- package/dist/validation/synthesis-eligibility.d.ts +31 -0
- package/dist/validation/synthesis-eligibility.d.ts.map +1 -0
- package/dist/validation/synthesis-eligibility.js +161 -0
- package/dist/validation/synthesis-eligibility.js.map +1 -0
- package/dist/validator-cases/any-and-object-literals.test.d.ts +10 -0
- package/dist/validator-cases/any-and-object-literals.test.d.ts.map +1 -0
- package/dist/validator-cases/any-and-object-literals.test.js +271 -0
- package/dist/validator-cases/any-and-object-literals.test.js.map +1 -0
- package/dist/validator-cases/generic-validation.test.d.ts +11 -0
- package/dist/validator-cases/generic-validation.test.d.ts.map +1 -0
- package/dist/validator-cases/generic-validation.test.js +282 -0
- package/dist/validator-cases/generic-validation.test.js.map +1 -0
- package/dist/validator-cases/helpers.d.ts +9 -0
- package/dist/validator-cases/helpers.d.ts.map +1 -0
- package/dist/validator-cases/helpers.js +46 -0
- package/dist/validator-cases/helpers.js.map +1 -0
- package/dist/validator-cases/parameters-and-dict-keys.test.d.ts +10 -0
- package/dist/validator-cases/parameters-and-dict-keys.test.d.ts.map +1 -0
- package/dist/validator-cases/parameters-and-dict-keys.test.js +280 -0
- package/dist/validator-cases/parameters-and-dict-keys.test.js.map +1 -0
- package/dist/validator-cases/utility-types.test.d.ts +12 -0
- package/dist/validator-cases/utility-types.test.d.ts.map +1 -0
- package/dist/validator-cases/utility-types.test.js +323 -0
- package/dist/validator-cases/utility-types.test.js.map +1 -0
- package/dist/validator-maximus-cases/array-and-literal-inference.test.d.ts +2 -0
- package/dist/validator-maximus-cases/array-and-literal-inference.test.d.ts.map +1 -0
- package/dist/validator-maximus-cases/array-and-literal-inference.test.js +221 -0
- package/dist/validator-maximus-cases/array-and-literal-inference.test.js.map +1 -0
- package/dist/validator-maximus-cases/deterministic-typing.test.d.ts +2 -0
- package/dist/validator-maximus-cases/deterministic-typing.test.d.ts.map +1 -0
- package/dist/validator-maximus-cases/deterministic-typing.test.js +432 -0
- package/dist/validator-maximus-cases/deterministic-typing.test.js.map +1 -0
- package/dist/validator-maximus-cases/dictionary-and-object-literal.test.d.ts +2 -0
- package/dist/validator-maximus-cases/dictionary-and-object-literal.test.d.ts.map +1 -0
- package/dist/validator-maximus-cases/dictionary-and-object-literal.test.js +273 -0
- package/dist/validator-maximus-cases/dictionary-and-object-literal.test.js.map +1 -0
- package/dist/validator-maximus-cases/feature-gating.test.d.ts +2 -0
- package/dist/validator-maximus-cases/feature-gating.test.d.ts.map +1 -0
- package/dist/validator-maximus-cases/feature-gating.test.js +181 -0
- package/dist/validator-maximus-cases/feature-gating.test.js.map +1 -0
- package/dist/validator-maximus-cases/generic-function-values.test.d.ts +2 -0
- package/dist/validator-maximus-cases/generic-function-values.test.d.ts.map +1 -0
- package/dist/validator-maximus-cases/generic-function-values.test.js +346 -0
- package/dist/validator-maximus-cases/generic-function-values.test.js.map +1 -0
- package/dist/validator-maximus-cases/helpers.d.ts +9 -0
- package/dist/validator-maximus-cases/helpers.d.ts.map +1 -0
- package/dist/validator-maximus-cases/helpers.js +113 -0
- package/dist/validator-maximus-cases/helpers.js.map +1 -0
- package/dist/validator-maximus-cases/type-syntax.test.d.ts +2 -0
- package/dist/validator-maximus-cases/type-syntax.test.d.ts.map +1 -0
- package/dist/validator-maximus-cases/type-syntax.test.js +157 -0
- package/dist/validator-maximus-cases/type-syntax.test.js.map +1 -0
- package/dist/validator.maximus.test.d.ts +6 -1
- package/dist/validator.maximus.test.d.ts.map +1 -1
- package/dist/validator.maximus.test.js +6 -1417
- package/dist/validator.maximus.test.js.map +1 -1
- package/dist/validator.test.d.ts +4 -10
- package/dist/validator.test.d.ts.map +1 -1
- package/dist/validator.test.js +4 -1086
- package/dist/validator.test.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Numeric Proof Pass - HARD GATE for numeric type narrowings
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Facade module that re-exports from focused sub-modules:
|
|
5
|
+
* - numeric-proof-analysis.ts: Type inference, guard facts, literal proofs
|
|
6
|
+
* - numeric-proof-proving.ts: Narrowing proof construction
|
|
7
|
+
* - numeric-proof-walk.ts: IR tree traversal and proof attachment
|
|
8
8
|
*
|
|
9
9
|
* CRITICAL: If this pass emits ANY errors, the emitter MUST NOT run.
|
|
10
10
|
* Unlike the previous implementation, this pass does NOT allow fallback casts.
|
|
@@ -13,1164 +13,5 @@
|
|
|
13
13
|
* This follows Alice's "Provably-Sound Numeric Types" specification:
|
|
14
14
|
* "If Tsonic cannot prove a numeric narrowing is sound, it must fail compilation."
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { NUMERIC_RANGES, getBinaryResultKind, isIntegerKind, TSONIC_TO_NUMERIC_KIND, isValidIntegerLexeme, parseBigIntFromRaw, bigIntFitsInKind, isWideningConversion, } from "../types.js";
|
|
18
|
-
/**
|
|
19
|
-
* Create a source location for a module
|
|
20
|
-
*/
|
|
21
|
-
const moduleLocation = (ctx) => ({
|
|
22
|
-
file: ctx.filePath,
|
|
23
|
-
line: 1,
|
|
24
|
-
column: 1,
|
|
25
|
-
length: 1,
|
|
26
|
-
});
|
|
27
|
-
const INT32_RANGE = NUMERIC_RANGES.get("Int32");
|
|
28
|
-
const cloneProofContext = (ctx) => ({
|
|
29
|
-
...ctx,
|
|
30
|
-
provenVariables: new Map(ctx.provenVariables),
|
|
31
|
-
provenParameters: new Map(ctx.provenParameters),
|
|
32
|
-
});
|
|
33
|
-
const extractIntegerLiteralBound = (expr) => {
|
|
34
|
-
if (expr.kind === "literal" && typeof expr.value === "number") {
|
|
35
|
-
if (expr.raw !== undefined && isValidIntegerLexeme(expr.raw)) {
|
|
36
|
-
return parseBigIntFromRaw(expr.raw);
|
|
37
|
-
}
|
|
38
|
-
if (Number.isInteger(expr.value)) {
|
|
39
|
-
return BigInt(expr.value);
|
|
40
|
-
}
|
|
41
|
-
return undefined;
|
|
42
|
-
}
|
|
43
|
-
if (expr.kind === "unary" &&
|
|
44
|
-
(expr.operator === "-" || expr.operator === "+") &&
|
|
45
|
-
expr.expression.kind === "literal" &&
|
|
46
|
-
typeof expr.expression.value === "number") {
|
|
47
|
-
const inner = extractIntegerLiteralBound(expr.expression);
|
|
48
|
-
if (inner === undefined)
|
|
49
|
-
return undefined;
|
|
50
|
-
return expr.operator === "-" ? -inner : inner;
|
|
51
|
-
}
|
|
52
|
-
return undefined;
|
|
53
|
-
};
|
|
54
|
-
const isIdentifierExpr = (expr) => expr.kind === "identifier";
|
|
55
|
-
const memberAccessName = (expr) => {
|
|
56
|
-
if (expr.kind !== "memberAccess" || expr.isComputed) {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
|
-
return typeof expr.property === "string"
|
|
60
|
-
? expr.property
|
|
61
|
-
: expr.property.kind === "literal" &&
|
|
62
|
-
typeof expr.property.value === "string"
|
|
63
|
-
? expr.property.value
|
|
64
|
-
: undefined;
|
|
65
|
-
};
|
|
66
|
-
const extractNumberIsIntegerFact = (expr) => {
|
|
67
|
-
if (expr.kind !== "call" || expr.arguments.length !== 1) {
|
|
68
|
-
return undefined;
|
|
69
|
-
}
|
|
70
|
-
const callee = expr.callee;
|
|
71
|
-
if (callee.kind !== "memberAccess" ||
|
|
72
|
-
!isIdentifierExpr(callee.object) ||
|
|
73
|
-
callee.object.name !== "Number" ||
|
|
74
|
-
memberAccessName(callee) !== "isInteger") {
|
|
75
|
-
return undefined;
|
|
76
|
-
}
|
|
77
|
-
const arg = expr.arguments[0];
|
|
78
|
-
if (!arg || !isIdentifierExpr(arg)) {
|
|
79
|
-
return undefined;
|
|
80
|
-
}
|
|
81
|
-
return [arg.name, { integerChecked: true }];
|
|
82
|
-
};
|
|
83
|
-
const extractInt32BoundFact = (expr) => {
|
|
84
|
-
if (expr.kind !== "binary") {
|
|
85
|
-
return undefined;
|
|
86
|
-
}
|
|
87
|
-
const directIdentifier = isIdentifierExpr(expr.left) &&
|
|
88
|
-
extractIntegerLiteralBound(expr.right) !== undefined
|
|
89
|
-
? {
|
|
90
|
-
name: expr.left.name,
|
|
91
|
-
bound: extractIntegerLiteralBound(expr.right),
|
|
92
|
-
operator: expr.operator,
|
|
93
|
-
reversed: false,
|
|
94
|
-
}
|
|
95
|
-
: isIdentifierExpr(expr.right) &&
|
|
96
|
-
extractIntegerLiteralBound(expr.left) !== undefined
|
|
97
|
-
? {
|
|
98
|
-
name: expr.right.name,
|
|
99
|
-
bound: extractIntegerLiteralBound(expr.left),
|
|
100
|
-
operator: expr.operator,
|
|
101
|
-
reversed: true,
|
|
102
|
-
}
|
|
103
|
-
: undefined;
|
|
104
|
-
if (!directIdentifier) {
|
|
105
|
-
return undefined;
|
|
106
|
-
}
|
|
107
|
-
const { name, bound, operator, reversed } = directIdentifier;
|
|
108
|
-
const effectiveOperator = reversed
|
|
109
|
-
? operator === ">="
|
|
110
|
-
? "<="
|
|
111
|
-
: operator === ">"
|
|
112
|
-
? "<"
|
|
113
|
-
: operator === "<="
|
|
114
|
-
? ">="
|
|
115
|
-
: operator === "<"
|
|
116
|
-
? ">"
|
|
117
|
-
: operator
|
|
118
|
-
: operator;
|
|
119
|
-
switch (effectiveOperator) {
|
|
120
|
-
case ">=":
|
|
121
|
-
return [name, { integerChecked: false, lowerBound: bound }];
|
|
122
|
-
case ">":
|
|
123
|
-
return [name, { integerChecked: false, lowerBound: bound + 1n }];
|
|
124
|
-
case "<=":
|
|
125
|
-
return [name, { integerChecked: false, upperBound: bound }];
|
|
126
|
-
case "<":
|
|
127
|
-
return [name, { integerChecked: false, upperBound: bound - 1n }];
|
|
128
|
-
default:
|
|
129
|
-
return undefined;
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
const mergeInt32GuardFact = (left, right) => ({
|
|
133
|
-
integerChecked: (left?.integerChecked ?? false) || right.integerChecked,
|
|
134
|
-
lowerBound: left?.lowerBound === undefined
|
|
135
|
-
? right.lowerBound
|
|
136
|
-
: right.lowerBound === undefined
|
|
137
|
-
? left.lowerBound
|
|
138
|
-
: left.lowerBound > right.lowerBound
|
|
139
|
-
? left.lowerBound
|
|
140
|
-
: right.lowerBound,
|
|
141
|
-
upperBound: left?.upperBound === undefined
|
|
142
|
-
? right.upperBound
|
|
143
|
-
: right.upperBound === undefined
|
|
144
|
-
? left.upperBound
|
|
145
|
-
: left.upperBound < right.upperBound
|
|
146
|
-
? left.upperBound
|
|
147
|
-
: right.upperBound,
|
|
148
|
-
});
|
|
149
|
-
const collectInt32GuardFactsInTruthyCondition = (expr) => {
|
|
150
|
-
if (expr.kind === "logical" && expr.operator === "&&") {
|
|
151
|
-
const out = new Map();
|
|
152
|
-
for (const [name, fact] of collectInt32GuardFactsInTruthyCondition(expr.left)) {
|
|
153
|
-
out.set(name, fact);
|
|
154
|
-
}
|
|
155
|
-
for (const [name, fact] of collectInt32GuardFactsInTruthyCondition(expr.right)) {
|
|
156
|
-
out.set(name, mergeInt32GuardFact(out.get(name), fact));
|
|
157
|
-
}
|
|
158
|
-
return out;
|
|
159
|
-
}
|
|
160
|
-
const integerFact = extractNumberIsIntegerFact(expr);
|
|
161
|
-
if (integerFact) {
|
|
162
|
-
return new Map([[integerFact[0], integerFact[1]]]);
|
|
163
|
-
}
|
|
164
|
-
const boundFact = extractInt32BoundFact(expr);
|
|
165
|
-
if (boundFact) {
|
|
166
|
-
return new Map([[boundFact[0], boundFact[1]]]);
|
|
167
|
-
}
|
|
168
|
-
return new Map();
|
|
169
|
-
};
|
|
170
|
-
const withInt32ProofsFromTruthyCondition = (ctx, condition) => {
|
|
171
|
-
if (!INT32_RANGE) {
|
|
172
|
-
return ctx;
|
|
173
|
-
}
|
|
174
|
-
const facts = collectInt32GuardFactsInTruthyCondition(condition);
|
|
175
|
-
if (facts.size === 0) {
|
|
176
|
-
return ctx;
|
|
177
|
-
}
|
|
178
|
-
const next = cloneProofContext(ctx);
|
|
179
|
-
for (const [name, fact] of facts) {
|
|
180
|
-
if (fact.integerChecked &&
|
|
181
|
-
fact.lowerBound !== undefined &&
|
|
182
|
-
fact.upperBound !== undefined &&
|
|
183
|
-
fact.lowerBound >= INT32_RANGE.min &&
|
|
184
|
-
fact.upperBound <= INT32_RANGE.max) {
|
|
185
|
-
next.provenVariables.set(name, "Int32");
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return next;
|
|
189
|
-
};
|
|
190
|
-
/**
|
|
191
|
-
* Extract NumericKind from an IrType if it represents a known numeric type
|
|
192
|
-
*
|
|
193
|
-
* INVARIANT: "int" is a distinct primitive type (primitiveType(name="int")),
|
|
194
|
-
* NOT primitiveType(name="number") with numericIntent.
|
|
195
|
-
*/
|
|
196
|
-
const getNumericKindFromType = (type) => {
|
|
197
|
-
if (type === undefined) {
|
|
198
|
-
return undefined;
|
|
199
|
-
}
|
|
200
|
-
// Nullable numeric forms (e.g., int | undefined, long | null) should preserve
|
|
201
|
-
// the underlying numeric kind for proof purposes.
|
|
202
|
-
if (type.kind === "unionType") {
|
|
203
|
-
const nonNullish = type.types.filter((t) => !(t.kind === "primitiveType" &&
|
|
204
|
-
(t.name === "null" || t.name === "undefined")));
|
|
205
|
-
if (nonNullish.length === 1) {
|
|
206
|
-
const only = nonNullish[0];
|
|
207
|
-
return only ? getNumericKindFromType(only) : undefined;
|
|
208
|
-
}
|
|
209
|
-
return undefined;
|
|
210
|
-
}
|
|
211
|
-
// Check for primitiveType(name="int") - distinct integer primitive
|
|
212
|
-
if (type.kind === "primitiveType" && type.name === "int") {
|
|
213
|
-
return "Int32";
|
|
214
|
-
}
|
|
215
|
-
// Check for referenceType with known numeric type name (e.g., long, float, byte)
|
|
216
|
-
// Use the TSONIC_TO_NUMERIC_KIND map from ir/types
|
|
217
|
-
if (type.kind === "referenceType") {
|
|
218
|
-
return TSONIC_TO_NUMERIC_KIND.get(type.name);
|
|
219
|
-
}
|
|
220
|
-
return undefined;
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* Try to infer the numeric kind of an expression.
|
|
224
|
-
* Returns undefined if the expression's numeric kind cannot be determined.
|
|
225
|
-
*
|
|
226
|
-
* For literals: follows C# semantics where integer-looking literals default to int.
|
|
227
|
-
* A literal is Int32 if: no decimal point, no exponent, fits in Int32 range.
|
|
228
|
-
* Otherwise it's Double.
|
|
229
|
-
*/
|
|
230
|
-
const inferNumericKind = (expr, ctx) => {
|
|
231
|
-
switch (expr.kind) {
|
|
232
|
-
case "literal": {
|
|
233
|
-
if (typeof expr.value === "number") {
|
|
234
|
-
// Check if inferred type has explicit numeric intent (from annotation)
|
|
235
|
-
const typeKind = getNumericKindFromType(expr.inferredType);
|
|
236
|
-
if (typeKind !== undefined) {
|
|
237
|
-
return typeKind;
|
|
238
|
-
}
|
|
239
|
-
// For bare literals, follow C# semantics:
|
|
240
|
-
// Integer-looking literals (no decimal, no exponent) are Int32/Int64 if in range
|
|
241
|
-
// Otherwise, they're Double
|
|
242
|
-
if (expr.raw !== undefined && isValidIntegerLexeme(expr.raw)) {
|
|
243
|
-
const bigValue = parseBigIntFromRaw(expr.raw);
|
|
244
|
-
if (bigValue !== undefined) {
|
|
245
|
-
if (bigIntFitsInKind(bigValue, "Int32")) {
|
|
246
|
-
return "Int32";
|
|
247
|
-
}
|
|
248
|
-
if (bigIntFitsInKind(bigValue, "Int64")) {
|
|
249
|
-
return "Int64";
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
// Floating-point or out-of-range integer literals are Double
|
|
254
|
-
return "Double";
|
|
255
|
-
}
|
|
256
|
-
return undefined;
|
|
257
|
-
}
|
|
258
|
-
case "identifier": {
|
|
259
|
-
// Check if this variable is proven
|
|
260
|
-
const varKind = ctx.provenVariables.get(expr.name);
|
|
261
|
-
if (varKind !== undefined) {
|
|
262
|
-
return varKind;
|
|
263
|
-
}
|
|
264
|
-
// Check if this is a parameter
|
|
265
|
-
const paramKind = ctx.provenParameters.get(expr.name);
|
|
266
|
-
if (paramKind !== undefined) {
|
|
267
|
-
return paramKind;
|
|
268
|
-
}
|
|
269
|
-
// Check inferredType for CLR-typed identifiers
|
|
270
|
-
return getNumericKindFromType(expr.inferredType);
|
|
271
|
-
}
|
|
272
|
-
case "numericNarrowing": {
|
|
273
|
-
// The target kind of the narrowing is the proven kind (if proof exists)
|
|
274
|
-
if (expr.proof) {
|
|
275
|
-
return expr.proof.kind;
|
|
276
|
-
}
|
|
277
|
-
// Fall back to targetKind - the narrowing declares intent even without proof
|
|
278
|
-
// This handles cases where we're inferring before proof is attached
|
|
279
|
-
return expr.targetKind;
|
|
280
|
-
}
|
|
281
|
-
case "binary": {
|
|
282
|
-
// Binary operators follow C# promotion rules
|
|
283
|
-
const leftKind = inferNumericKind(expr.left, ctx);
|
|
284
|
-
const rightKind = inferNumericKind(expr.right, ctx);
|
|
285
|
-
if (leftKind !== undefined && rightKind !== undefined) {
|
|
286
|
-
return getBinaryResultKind(leftKind, rightKind);
|
|
287
|
-
}
|
|
288
|
-
return undefined;
|
|
289
|
-
}
|
|
290
|
-
case "unary": {
|
|
291
|
-
if (expr.operator === "-" ||
|
|
292
|
-
expr.operator === "+" ||
|
|
293
|
-
expr.operator === "~") {
|
|
294
|
-
return inferNumericKind(expr.expression, ctx);
|
|
295
|
-
}
|
|
296
|
-
return undefined;
|
|
297
|
-
}
|
|
298
|
-
case "conditional": {
|
|
299
|
-
const trueKind = inferNumericKind(expr.whenTrue, ctx);
|
|
300
|
-
const falseKind = inferNumericKind(expr.whenFalse, ctx);
|
|
301
|
-
if (trueKind === falseKind) {
|
|
302
|
-
return trueKind;
|
|
303
|
-
}
|
|
304
|
-
if (trueKind !== undefined && falseKind !== undefined) {
|
|
305
|
-
return getBinaryResultKind(trueKind, falseKind);
|
|
306
|
-
}
|
|
307
|
-
return undefined;
|
|
308
|
-
}
|
|
309
|
-
case "logical": {
|
|
310
|
-
// `??` preserves the left kind when present, otherwise uses the right kind.
|
|
311
|
-
// For proof, we require both sides to be numerically provable and derive
|
|
312
|
-
// a deterministic promoted kind.
|
|
313
|
-
if (expr.operator === "??") {
|
|
314
|
-
const leftKind = inferNumericKind(expr.left, ctx);
|
|
315
|
-
const rightKind = inferNumericKind(expr.right, ctx);
|
|
316
|
-
if (leftKind === rightKind)
|
|
317
|
-
return leftKind;
|
|
318
|
-
if (leftKind !== undefined && rightKind !== undefined) {
|
|
319
|
-
return getBinaryResultKind(leftKind, rightKind);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
return undefined;
|
|
323
|
-
}
|
|
324
|
-
case "call": {
|
|
325
|
-
// Check if the call has a numeric return type from CLR metadata
|
|
326
|
-
return getNumericKindFromType(expr.inferredType);
|
|
327
|
-
}
|
|
328
|
-
case "memberAccess": {
|
|
329
|
-
return getNumericKindFromType(expr.inferredType);
|
|
330
|
-
}
|
|
331
|
-
default:
|
|
332
|
-
return undefined;
|
|
333
|
-
}
|
|
334
|
-
};
|
|
335
|
-
/**
|
|
336
|
-
* Attempt to prove that a literal fits in a target numeric kind.
|
|
337
|
-
* Uses the raw lexeme for integer validation (NOT the JS number).
|
|
338
|
-
*/
|
|
339
|
-
const proveLiteral = (value, raw, targetKind, ctx, sourceSpan) => {
|
|
340
|
-
const location = sourceSpan ?? moduleLocation(ctx);
|
|
341
|
-
// For floating-point targets, any finite number works
|
|
342
|
-
if (!isIntegerKind(targetKind)) {
|
|
343
|
-
if (!Number.isFinite(value)) {
|
|
344
|
-
ctx.diagnostics.push(createDiagnostic("TSN5102", "error", `Literal ${value} cannot be proven as ${targetKind}: not a finite number`, location, "Only finite numbers can be used as floating-point types."));
|
|
345
|
-
return undefined;
|
|
346
|
-
}
|
|
347
|
-
return {
|
|
348
|
-
kind: targetKind,
|
|
349
|
-
source: { type: "literal", value },
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
// For integer targets, we MUST have the raw lexeme
|
|
353
|
-
if (raw === undefined) {
|
|
354
|
-
ctx.diagnostics.push(createDiagnostic("TSN5102", "error", `Cannot prove literal as ${targetKind}: raw lexeme not available`, location, "Integer literal proofs require the source lexeme for precision."));
|
|
355
|
-
return undefined;
|
|
356
|
-
}
|
|
357
|
-
// Check that the lexeme represents an integer (no decimal, no exponent)
|
|
358
|
-
if (!isValidIntegerLexeme(raw)) {
|
|
359
|
-
ctx.diagnostics.push(createDiagnostic("TSN5102", "error", `Literal '${raw}' cannot be proven as ${targetKind}: not an integer lexeme`, location, "Use an integer literal (no decimal point or exponent), or use float/double."));
|
|
360
|
-
return undefined;
|
|
361
|
-
}
|
|
362
|
-
// Parse as BigInt for precise range checking
|
|
363
|
-
const bigValue = parseBigIntFromRaw(raw);
|
|
364
|
-
if (bigValue === undefined) {
|
|
365
|
-
ctx.diagnostics.push(createDiagnostic("TSN5102", "error", `Cannot parse literal '${raw}' as integer`, location, "The literal could not be parsed as an integer value."));
|
|
366
|
-
return undefined;
|
|
367
|
-
}
|
|
368
|
-
// JS Safe Integer check: Literals > 2^53-1 lose precision in JavaScript
|
|
369
|
-
// This is a representation soundness check - the TypeScript parser may have
|
|
370
|
-
// already lost precision by the time we see the JS number value.
|
|
371
|
-
const JS_MAX_SAFE_INTEGER = BigInt("9007199254740991"); // 2^53 - 1
|
|
372
|
-
const JS_MIN_SAFE_INTEGER = BigInt("-9007199254740991"); // -(2^53 - 1)
|
|
373
|
-
if (bigValue > JS_MAX_SAFE_INTEGER || bigValue < JS_MIN_SAFE_INTEGER) {
|
|
374
|
-
ctx.diagnostics.push(createDiagnostic("TSN5108", "error", `Literal ${raw} exceeds JavaScript safe integer range (±${JS_MAX_SAFE_INTEGER})`, location, "Values outside ±2^53-1 cannot be exactly represented in JavaScript. " +
|
|
375
|
-
"Use BigInt literals (e.g., 9007199254740992n) or string parsing."));
|
|
376
|
-
return undefined;
|
|
377
|
-
}
|
|
378
|
-
// Check range
|
|
379
|
-
if (!bigIntFitsInKind(bigValue, targetKind)) {
|
|
380
|
-
const range = NUMERIC_RANGES.get(targetKind);
|
|
381
|
-
ctx.diagnostics.push(createDiagnostic("TSN5102", "error", `Literal ${raw} is out of range for type ${targetKind} (valid range: ${range?.min} to ${range?.max})`, location, `Value must be in range ${range?.min} to ${range?.max} for ${targetKind}.`));
|
|
382
|
-
return undefined;
|
|
383
|
-
}
|
|
384
|
-
return {
|
|
385
|
-
kind: targetKind,
|
|
386
|
-
source: { type: "literal", value: bigValue },
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
/**
|
|
390
|
-
* Attempt to prove a numeric narrowing expression.
|
|
391
|
-
* If proof fails, emits an error diagnostic - NO FALLBACK TO CAST.
|
|
392
|
-
*/
|
|
393
|
-
const proveNarrowing = (expr, ctx) => {
|
|
394
|
-
const innerExpr = expr.expression;
|
|
395
|
-
const targetKind = expr.targetKind;
|
|
396
|
-
// Use expression's sourceSpan if available, otherwise fall back to module location
|
|
397
|
-
const location = expr.sourceSpan ?? innerExpr.sourceSpan ?? moduleLocation(ctx);
|
|
398
|
-
// Case 1: Inner expression is a literal
|
|
399
|
-
if (innerExpr.kind === "literal" && typeof innerExpr.value === "number") {
|
|
400
|
-
const proof = proveLiteral(innerExpr.value, innerExpr.raw, targetKind, ctx, innerExpr.sourceSpan ?? location);
|
|
401
|
-
if (proof === undefined) {
|
|
402
|
-
// proveLiteral already pushed the diagnostic
|
|
403
|
-
return undefined;
|
|
404
|
-
}
|
|
405
|
-
return proof;
|
|
406
|
-
}
|
|
407
|
-
// Case 2: Inner expression is an identifier that is already proven
|
|
408
|
-
if (innerExpr.kind === "identifier") {
|
|
409
|
-
const varKind = ctx.provenVariables.get(innerExpr.name);
|
|
410
|
-
const paramKind = ctx.provenParameters.get(innerExpr.name);
|
|
411
|
-
const sourceKind = varKind ?? paramKind;
|
|
412
|
-
if (sourceKind !== undefined) {
|
|
413
|
-
if (sourceKind === targetKind) {
|
|
414
|
-
return {
|
|
415
|
-
kind: targetKind,
|
|
416
|
-
source: { type: "variable", name: innerExpr.name },
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
// Check if this is a widening conversion (e.g., int → long)
|
|
420
|
-
if (isWideningConversion(sourceKind, targetKind)) {
|
|
421
|
-
return {
|
|
422
|
-
kind: targetKind,
|
|
423
|
-
source: { type: "variable", name: innerExpr.name },
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
// Narrowing conversion - this is an error
|
|
427
|
-
ctx.diagnostics.push(createDiagnostic("TSN5104", "error", `Cannot narrow '${innerExpr.name}' from ${sourceKind} to ${targetKind}`, innerExpr.sourceSpan ?? location, `Variable '${innerExpr.name}' is proven as ${sourceKind}. ` +
|
|
428
|
-
`Narrowing conversions require explicit handling.`));
|
|
429
|
-
return undefined;
|
|
430
|
-
}
|
|
431
|
-
// Identifier not in proven scope - check if it has numeric intent from CLR
|
|
432
|
-
const identKind = getNumericKindFromType(innerExpr.inferredType);
|
|
433
|
-
if (identKind !== undefined) {
|
|
434
|
-
if (identKind === targetKind ||
|
|
435
|
-
isWideningConversion(identKind, targetKind)) {
|
|
436
|
-
return {
|
|
437
|
-
kind: targetKind,
|
|
438
|
-
source: { type: "variable", name: innerExpr.name },
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
// Cannot prove this identifier
|
|
443
|
-
ctx.diagnostics.push(createDiagnostic("TSN5101", "error", `Cannot prove narrowing of '${innerExpr.name}' to ${targetKind}`, innerExpr.sourceSpan ?? location, `Expression '${innerExpr.name}' has unknown numeric kind. ` +
|
|
444
|
-
`Narrow using \`${innerExpr.name} as ${targetKind}\` at assignment, ` +
|
|
445
|
-
`or ensure it originates from a proven ${targetKind} source.`));
|
|
446
|
-
return undefined;
|
|
447
|
-
}
|
|
448
|
-
// Case 3: Inner expression is a binary operation
|
|
449
|
-
if (innerExpr.kind === "binary") {
|
|
450
|
-
const leftKind = inferNumericKind(innerExpr.left, ctx);
|
|
451
|
-
const rightKind = inferNumericKind(innerExpr.right, ctx);
|
|
452
|
-
if (leftKind !== undefined && rightKind !== undefined) {
|
|
453
|
-
const resultKind = getBinaryResultKind(leftKind, rightKind);
|
|
454
|
-
if (resultKind === targetKind) {
|
|
455
|
-
return {
|
|
456
|
-
kind: targetKind,
|
|
457
|
-
source: {
|
|
458
|
-
type: "binaryOp",
|
|
459
|
-
operator: innerExpr.operator,
|
|
460
|
-
leftKind,
|
|
461
|
-
rightKind,
|
|
462
|
-
},
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
// Result kind doesn't match target - error
|
|
466
|
-
ctx.diagnostics.push(createDiagnostic("TSN5103", "error", `Binary '${leftKind} ${innerExpr.operator} ${rightKind}' produces ${resultKind}, not ${targetKind}`, innerExpr.sourceSpan ?? location, `C# promotion rules: ${leftKind} ${innerExpr.operator} ${rightKind} = ${resultKind}. ` +
|
|
467
|
-
`Cast operands to ${targetKind} first if needed.`));
|
|
468
|
-
return undefined;
|
|
469
|
-
}
|
|
470
|
-
// Fallback for explicit narrowing of binary expressions:
|
|
471
|
-
// if the binary node itself already carries deterministic numeric intent,
|
|
472
|
-
// accept `(...binary...) as <targetKind>` as an explicit cast for
|
|
473
|
-
// opaque producer operands (e.g. conversion calls) where operand-level
|
|
474
|
-
// kind recovery is intentionally conservative.
|
|
475
|
-
const isOpaqueNumericProducer = (expression) => expression.kind === "call" ||
|
|
476
|
-
expression.kind === "memberAccess" ||
|
|
477
|
-
expression.kind === "await";
|
|
478
|
-
const inferredBinaryKind = getNumericKindFromType(innerExpr.inferredType) ??
|
|
479
|
-
(innerExpr.inferredType?.kind === "primitiveType" &&
|
|
480
|
-
innerExpr.inferredType.name === "number"
|
|
481
|
-
? "Double"
|
|
482
|
-
: undefined);
|
|
483
|
-
if (inferredBinaryKind !== undefined &&
|
|
484
|
-
isOpaqueNumericProducer(innerExpr.left) &&
|
|
485
|
-
isOpaqueNumericProducer(innerExpr.right)) {
|
|
486
|
-
return {
|
|
487
|
-
kind: targetKind,
|
|
488
|
-
source: { type: "narrowing", from: inferredBinaryKind },
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
// Cannot determine operand kinds
|
|
492
|
-
ctx.diagnostics.push(createDiagnostic("TSN5101", "error", `Cannot prove narrowing of binary expression to ${targetKind}`, innerExpr.sourceSpan ?? location, "One or both operands have unknown numeric kind. " +
|
|
493
|
-
"Ensure all operands are proven numeric types."));
|
|
494
|
-
return undefined;
|
|
495
|
-
}
|
|
496
|
-
// Case 4: Inner expression is a unary operation
|
|
497
|
-
if (innerExpr.kind === "unary") {
|
|
498
|
-
if (innerExpr.operator === "-" ||
|
|
499
|
-
innerExpr.operator === "+" ||
|
|
500
|
-
innerExpr.operator === "~") {
|
|
501
|
-
const operandKind = inferNumericKind(innerExpr.expression, ctx);
|
|
502
|
-
if (operandKind !== undefined && operandKind === targetKind) {
|
|
503
|
-
return {
|
|
504
|
-
kind: targetKind,
|
|
505
|
-
source: {
|
|
506
|
-
type: "unaryOp",
|
|
507
|
-
operator: innerExpr.operator,
|
|
508
|
-
operandKind,
|
|
509
|
-
},
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
ctx.diagnostics.push(createDiagnostic("TSN5101", "error", `Cannot prove narrowing of unary expression to ${targetKind}`, innerExpr.sourceSpan ?? location, "Unary expression has unknown or mismatched numeric kind. " +
|
|
514
|
-
"Ensure the operand is a proven numeric type."));
|
|
515
|
-
return undefined;
|
|
516
|
-
}
|
|
517
|
-
// Case 5: Inner expression is another numeric narrowing (nested)
|
|
518
|
-
if (innerExpr.kind === "numericNarrowing") {
|
|
519
|
-
if (innerExpr.proof !== undefined && innerExpr.proof.kind === targetKind) {
|
|
520
|
-
return {
|
|
521
|
-
kind: targetKind,
|
|
522
|
-
source: { type: "narrowing", from: innerExpr.proof.kind },
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
ctx.diagnostics.push(createDiagnostic("TSN5101", "error", `Cannot prove nested narrowing to ${targetKind}`, innerExpr.sourceSpan ?? location, "Inner narrowing is unproven or has different kind."));
|
|
526
|
-
return undefined;
|
|
527
|
-
}
|
|
528
|
-
// Case 6: Inner expression is a call with known return type from CLR
|
|
529
|
-
if (innerExpr.kind === "call") {
|
|
530
|
-
const returnKind = getNumericKindFromType(innerExpr.inferredType);
|
|
531
|
-
if (returnKind !== undefined && returnKind === targetKind) {
|
|
532
|
-
const methodName = innerExpr.callee.kind === "memberAccess" &&
|
|
533
|
-
typeof innerExpr.callee.property === "string"
|
|
534
|
-
? innerExpr.callee.property
|
|
535
|
-
: "unknown";
|
|
536
|
-
return {
|
|
537
|
-
kind: targetKind,
|
|
538
|
-
source: { type: "dotnetReturn", method: methodName, returnKind },
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
// Case 7: Inner expression is a member access with known type
|
|
543
|
-
if (innerExpr.kind === "memberAccess") {
|
|
544
|
-
const memberKind = getNumericKindFromType(innerExpr.inferredType);
|
|
545
|
-
if (memberKind !== undefined && memberKind === targetKind) {
|
|
546
|
-
const propName = typeof innerExpr.property === "string"
|
|
547
|
-
? innerExpr.property
|
|
548
|
-
: "computed";
|
|
549
|
-
return {
|
|
550
|
-
kind: targetKind,
|
|
551
|
-
source: {
|
|
552
|
-
type: "dotnetReturn",
|
|
553
|
-
method: propName,
|
|
554
|
-
returnKind: memberKind,
|
|
555
|
-
},
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
// Case 8: Inner expression is nullish coalescing on numeric values
|
|
560
|
-
if (innerExpr.kind === "logical" && innerExpr.operator === "??") {
|
|
561
|
-
const leftKind = inferNumericKind(innerExpr.left, ctx);
|
|
562
|
-
const rightKind = inferNumericKind(innerExpr.right, ctx);
|
|
563
|
-
if (leftKind !== undefined && rightKind !== undefined) {
|
|
564
|
-
const resultKind = leftKind === rightKind
|
|
565
|
-
? leftKind
|
|
566
|
-
: getBinaryResultKind(leftKind, rightKind);
|
|
567
|
-
if (resultKind === targetKind ||
|
|
568
|
-
isWideningConversion(resultKind, targetKind)) {
|
|
569
|
-
return {
|
|
570
|
-
kind: targetKind,
|
|
571
|
-
source: {
|
|
572
|
-
type: "binaryOp",
|
|
573
|
-
operator: "??",
|
|
574
|
-
leftKind,
|
|
575
|
-
rightKind,
|
|
576
|
-
},
|
|
577
|
-
};
|
|
578
|
-
}
|
|
579
|
-
ctx.diagnostics.push(createDiagnostic("TSN5103", "error", `Nullish coalescing '${leftKind} ?? ${rightKind}' produces ${resultKind}, not ${targetKind}`, innerExpr.sourceSpan ?? location, `Ensure both branches are provably ${targetKind} (or widen explicitly).`));
|
|
580
|
-
return undefined;
|
|
581
|
-
}
|
|
582
|
-
ctx.diagnostics.push(createDiagnostic("TSN5101", "error", `Cannot prove narrowing of nullish coalescing expression to ${targetKind}`, innerExpr.sourceSpan ?? location, "Left/right branches must both be provable numeric kinds."));
|
|
583
|
-
return undefined;
|
|
584
|
-
}
|
|
585
|
-
// Case 9: Inner expression is a conditional expression with deterministic
|
|
586
|
-
// numeric branch result.
|
|
587
|
-
if (innerExpr.kind === "conditional") {
|
|
588
|
-
const resultKind = inferNumericKind(innerExpr, ctx);
|
|
589
|
-
if (resultKind !== undefined) {
|
|
590
|
-
if (resultKind === targetKind ||
|
|
591
|
-
isWideningConversion(resultKind, targetKind)) {
|
|
592
|
-
return {
|
|
593
|
-
kind: targetKind,
|
|
594
|
-
source: { type: "narrowing", from: resultKind },
|
|
595
|
-
};
|
|
596
|
-
}
|
|
597
|
-
ctx.diagnostics.push(createDiagnostic("TSN5103", "error", `Conditional expression produces ${resultKind}, not ${targetKind}`, innerExpr.sourceSpan ?? location, `Ensure both conditional branches are provably ${targetKind} (or widen explicitly).`));
|
|
598
|
-
return undefined;
|
|
599
|
-
}
|
|
600
|
-
ctx.diagnostics.push(createDiagnostic("TSN5101", "error", `Cannot prove narrowing of conditional expression to ${targetKind}`, innerExpr.sourceSpan ?? location, "Both conditional branches must be provable numeric kinds."));
|
|
601
|
-
return undefined;
|
|
602
|
-
}
|
|
603
|
-
// HARD GATE: Cannot prove - emit error, DO NOT fallback to cast
|
|
604
|
-
ctx.diagnostics.push(createDiagnostic("TSN5101", "error", `Cannot prove narrowing to ${targetKind}`, location, `Expression of kind '${innerExpr.kind}' cannot be proven to produce ${targetKind}. ` +
|
|
605
|
-
`Ensure the expression is a literal in range, a variable with known numeric type, ` +
|
|
606
|
-
`or a binary/unary operation on proven numeric operands.`));
|
|
607
|
-
return undefined;
|
|
608
|
-
};
|
|
609
|
-
/**
|
|
610
|
-
* Process an expression, proving numeric narrowings and returning
|
|
611
|
-
* the expression with proofs attached.
|
|
612
|
-
*/
|
|
613
|
-
const processExpression = (expr, ctx) => {
|
|
614
|
-
switch (expr.kind) {
|
|
615
|
-
case "numericNarrowing": {
|
|
616
|
-
const processedInner = processExpression(expr.expression, ctx);
|
|
617
|
-
const proof = proveNarrowing({ ...expr, expression: processedInner }, ctx);
|
|
618
|
-
// Note: proof may be undefined if proveNarrowing failed (diagnostic pushed)
|
|
619
|
-
// We still return the expression but without proof - emitter will fail if it sees this
|
|
620
|
-
return {
|
|
621
|
-
...expr,
|
|
622
|
-
expression: processedInner,
|
|
623
|
-
proof,
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
case "identifier": {
|
|
627
|
-
// Preserve parameter passing modifiers (out<T>, ref<T>, inref<T>) from `as` casts.
|
|
628
|
-
// When expression converter processes `value as out<int>`, it creates an identifier
|
|
629
|
-
// with inferredType: { kind: "referenceType", name: "out", ... }. We must NOT
|
|
630
|
-
// overwrite this with the numeric proof, as it would lose the cast information.
|
|
631
|
-
if (expr.inferredType?.kind === "referenceType" &&
|
|
632
|
-
(expr.inferredType.name === "out" ||
|
|
633
|
-
expr.inferredType.name === "ref" ||
|
|
634
|
-
expr.inferredType.name === "inref")) {
|
|
635
|
-
return expr;
|
|
636
|
-
}
|
|
637
|
-
// Annotate identifiers with their proven numeric kind
|
|
638
|
-
// This allows the emitter to know that x is Int32 when used in binary expressions
|
|
639
|
-
const varKind = ctx.provenVariables.get(expr.name);
|
|
640
|
-
const paramKind = ctx.provenParameters.get(expr.name);
|
|
641
|
-
const numericKind = varKind ?? paramKind;
|
|
642
|
-
if (numericKind !== undefined) {
|
|
643
|
-
// Update inferredType to reflect the proven numeric type
|
|
644
|
-
// INVARIANT: "Int32" → primitiveType(name="int")
|
|
645
|
-
const baseType = numericKind === "Int32"
|
|
646
|
-
? { kind: "primitiveType", name: "int" }
|
|
647
|
-
: { kind: "referenceType", name: numericKind };
|
|
648
|
-
// Preserve nullable wrapper: if the original type was `T | null` or
|
|
649
|
-
// `T | undefined`, the proven type must remain nullable so that the
|
|
650
|
-
// emitter does not treat it as a non-nullable value type and drop `??`.
|
|
651
|
-
const originalIsNullable = expr.inferredType?.kind === "unionType" &&
|
|
652
|
-
expr.inferredType.types.some((t) => t.kind === "primitiveType" &&
|
|
653
|
-
(t.name === "null" || t.name === "undefined"));
|
|
654
|
-
const inferredType = originalIsNullable
|
|
655
|
-
? {
|
|
656
|
-
kind: "unionType",
|
|
657
|
-
types: [
|
|
658
|
-
baseType,
|
|
659
|
-
{ kind: "primitiveType", name: "null" },
|
|
660
|
-
],
|
|
661
|
-
}
|
|
662
|
-
: baseType;
|
|
663
|
-
return {
|
|
664
|
-
...expr,
|
|
665
|
-
inferredType,
|
|
666
|
-
};
|
|
667
|
-
}
|
|
668
|
-
return expr;
|
|
669
|
-
}
|
|
670
|
-
case "array":
|
|
671
|
-
return {
|
|
672
|
-
...expr,
|
|
673
|
-
elements: expr.elements.map((e) => e !== undefined ? processExpression(e, ctx) : undefined),
|
|
674
|
-
};
|
|
675
|
-
case "object":
|
|
676
|
-
return {
|
|
677
|
-
...expr,
|
|
678
|
-
properties: expr.properties.map((p) => {
|
|
679
|
-
if (p.kind === "property") {
|
|
680
|
-
return {
|
|
681
|
-
...p,
|
|
682
|
-
key: typeof p.key === "string"
|
|
683
|
-
? p.key
|
|
684
|
-
: processExpression(p.key, ctx),
|
|
685
|
-
value: processExpression(p.value, ctx),
|
|
686
|
-
};
|
|
687
|
-
}
|
|
688
|
-
return {
|
|
689
|
-
...p,
|
|
690
|
-
expression: processExpression(p.expression, ctx),
|
|
691
|
-
};
|
|
692
|
-
}),
|
|
693
|
-
};
|
|
694
|
-
case "binary": {
|
|
695
|
-
const processedLeft = processExpression(expr.left, ctx);
|
|
696
|
-
const processedRight = processExpression(expr.right, ctx);
|
|
697
|
-
// Comparison operators return boolean, not numeric - skip numeric annotation
|
|
698
|
-
const comparisonOperators = new Set([
|
|
699
|
-
"<",
|
|
700
|
-
">",
|
|
701
|
-
"<=",
|
|
702
|
-
">=",
|
|
703
|
-
"==",
|
|
704
|
-
"!=",
|
|
705
|
-
"===",
|
|
706
|
-
"!==",
|
|
707
|
-
]);
|
|
708
|
-
if (comparisonOperators.has(expr.operator)) {
|
|
709
|
-
// Comparison operators produce boolean, NOT numeric types
|
|
710
|
-
return {
|
|
711
|
-
...expr,
|
|
712
|
-
left: processedLeft,
|
|
713
|
-
right: processedRight,
|
|
714
|
-
};
|
|
715
|
-
}
|
|
716
|
-
// Infer numeric kind from processed operands (only for arithmetic/bitwise ops)
|
|
717
|
-
const leftKind = inferNumericKind(processedLeft, ctx);
|
|
718
|
-
const rightKind = inferNumericKind(processedRight, ctx);
|
|
719
|
-
// If both operands have numeric kinds, annotate the binary result
|
|
720
|
-
if (leftKind !== undefined && rightKind !== undefined) {
|
|
721
|
-
const resultKind = getBinaryResultKind(leftKind, rightKind);
|
|
722
|
-
// INVARIANT: "Int32" → primitiveType(name="int")
|
|
723
|
-
const inferredType = resultKind === "Int32"
|
|
724
|
-
? { kind: "primitiveType", name: "int" }
|
|
725
|
-
: { kind: "referenceType", name: resultKind };
|
|
726
|
-
return {
|
|
727
|
-
...expr,
|
|
728
|
-
left: processedLeft,
|
|
729
|
-
right: processedRight,
|
|
730
|
-
inferredType,
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
return {
|
|
734
|
-
...expr,
|
|
735
|
-
left: processedLeft,
|
|
736
|
-
right: processedRight,
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
case "logical":
|
|
740
|
-
return {
|
|
741
|
-
...expr,
|
|
742
|
-
left: processExpression(expr.left, ctx),
|
|
743
|
-
right: processExpression(expr.right, ctx),
|
|
744
|
-
};
|
|
745
|
-
case "unary":
|
|
746
|
-
case "update":
|
|
747
|
-
case "await":
|
|
748
|
-
case "spread":
|
|
749
|
-
return {
|
|
750
|
-
...expr,
|
|
751
|
-
expression: processExpression(expr.expression, ctx),
|
|
752
|
-
};
|
|
753
|
-
case "yield":
|
|
754
|
-
return {
|
|
755
|
-
...expr,
|
|
756
|
-
expression: expr.expression
|
|
757
|
-
? processExpression(expr.expression, ctx)
|
|
758
|
-
: undefined,
|
|
759
|
-
};
|
|
760
|
-
case "conditional":
|
|
761
|
-
return {
|
|
762
|
-
...expr,
|
|
763
|
-
condition: processExpression(expr.condition, ctx),
|
|
764
|
-
whenTrue: processExpression(expr.whenTrue, ctx),
|
|
765
|
-
whenFalse: processExpression(expr.whenFalse, ctx),
|
|
766
|
-
};
|
|
767
|
-
case "assignment":
|
|
768
|
-
return {
|
|
769
|
-
...expr,
|
|
770
|
-
left: expr.left.kind === "identifierPattern" ||
|
|
771
|
-
expr.left.kind === "arrayPattern" ||
|
|
772
|
-
expr.left.kind === "objectPattern"
|
|
773
|
-
? expr.left
|
|
774
|
-
: processExpression(expr.left, ctx),
|
|
775
|
-
right: processExpression(expr.right, ctx),
|
|
776
|
-
};
|
|
777
|
-
case "memberAccess": {
|
|
778
|
-
const processedObject = processExpression(expr.object, ctx);
|
|
779
|
-
const processedProperty = typeof expr.property === "string"
|
|
780
|
-
? expr.property
|
|
781
|
-
: processExpression(expr.property, ctx);
|
|
782
|
-
// ============================================================================
|
|
783
|
-
// CONTRACT: Proof pass is the ONLY source of numeric proofs.
|
|
784
|
-
// The emitter ONLY consumes markers (numericIntent); it never re-derives proofs.
|
|
785
|
-
// If this pass doesn't annotate an index, the emitter will ICE.
|
|
786
|
-
// ============================================================================
|
|
787
|
-
// ARRAY INDEX VALIDATION: Use accessKind tag (set during IR build) to determine
|
|
788
|
-
// whether Int32 proof is required. This is COMPILER-GRADE: no heuristic name matching.
|
|
789
|
-
if (typeof processedProperty !== "string" && expr.isComputed) {
|
|
790
|
-
const accessKind = expr.accessKind;
|
|
791
|
-
// HARD GATE: accessKind MUST be set for computed access.
|
|
792
|
-
// If missing or "unknown", this is a compiler bug - fail early with clear diagnostic.
|
|
793
|
-
if (accessKind === undefined || accessKind === "unknown") {
|
|
794
|
-
// Build debug info for diagnosis
|
|
795
|
-
const objectType = processedObject.inferredType;
|
|
796
|
-
const typeInfo = objectType
|
|
797
|
-
? `objectType.kind=${objectType.kind}` +
|
|
798
|
-
(objectType.kind === "referenceType"
|
|
799
|
-
? `, name=${objectType.name}, resolvedClrType=${objectType.resolvedClrType ?? "undefined"}`
|
|
800
|
-
: "")
|
|
801
|
-
: "objectType=undefined";
|
|
802
|
-
ctx.diagnostics.push(createDiagnostic("TSN5109", "error", `Computed access kind was not classified during IR build (accessKind=${accessKind ?? "undefined"}, ${typeInfo})`, expr.sourceSpan ??
|
|
803
|
-
processedProperty.sourceSpan ??
|
|
804
|
-
moduleLocation(ctx), "This is a compiler bug: cannot validate index proof without access classification. " +
|
|
805
|
-
"Report this issue with the source code that triggered it."));
|
|
806
|
-
// Return without annotation - emitter will ICE if it reaches this
|
|
807
|
-
return {
|
|
808
|
-
...expr,
|
|
809
|
-
object: processedObject,
|
|
810
|
-
property: processedProperty,
|
|
811
|
-
};
|
|
812
|
-
}
|
|
813
|
-
// Require Int32 proof for:
|
|
814
|
-
// - clrIndexer: CLR collection indexers (List<T>, Array, etc.)
|
|
815
|
-
// - stringChar: string character access
|
|
816
|
-
// Dictionary access does NOT require Int32 proof (key is typed K, usually string)
|
|
817
|
-
const requiresInt32 = accessKind === "clrIndexer" || accessKind === "stringChar";
|
|
818
|
-
if (requiresInt32) {
|
|
819
|
-
const indexKind = inferNumericKind(processedProperty, ctx);
|
|
820
|
-
if (indexKind !== "Int32") {
|
|
821
|
-
ctx.diagnostics.push(createDiagnostic("TSN5107", "error", `Array index must be Int32, got ${indexKind ?? "unknown"}`, processedProperty.sourceSpan ?? moduleLocation(ctx), "Use 'index as int' to narrow, or ensure index is derived from Int32 source."));
|
|
822
|
-
// Return without annotation - emitter will ICE if it reaches this
|
|
823
|
-
return {
|
|
824
|
-
...expr,
|
|
825
|
-
object: processedObject,
|
|
826
|
-
property: processedProperty,
|
|
827
|
-
};
|
|
828
|
-
}
|
|
829
|
-
// Annotate the index expression with int type so emitter can check it
|
|
830
|
-
// without re-deriving the proof. This is the ONLY place proof markers should be set.
|
|
831
|
-
// INVARIANT: Array indices must be primitiveType(name="int")
|
|
832
|
-
const annotatedProperty = {
|
|
833
|
-
...processedProperty,
|
|
834
|
-
inferredType: {
|
|
835
|
-
kind: "primitiveType",
|
|
836
|
-
name: "int",
|
|
837
|
-
},
|
|
838
|
-
};
|
|
839
|
-
return {
|
|
840
|
-
...expr,
|
|
841
|
-
object: processedObject,
|
|
842
|
-
property: annotatedProperty,
|
|
843
|
-
};
|
|
844
|
-
}
|
|
845
|
-
// For dictionary access (accessKind === "dictionary"): no Int32 requirement
|
|
846
|
-
// Pass through without annotation - key type is handled by the dictionary itself
|
|
847
|
-
}
|
|
848
|
-
return {
|
|
849
|
-
...expr,
|
|
850
|
-
object: processedObject,
|
|
851
|
-
property: processedProperty,
|
|
852
|
-
};
|
|
853
|
-
}
|
|
854
|
-
case "call":
|
|
855
|
-
return {
|
|
856
|
-
...expr,
|
|
857
|
-
callee: processExpression(expr.callee, ctx),
|
|
858
|
-
arguments: expr.arguments.map((a) => processExpression(a, ctx)),
|
|
859
|
-
dynamicImportNamespace: expr.dynamicImportNamespace
|
|
860
|
-
? processExpression(expr.dynamicImportNamespace, ctx)
|
|
861
|
-
: undefined,
|
|
862
|
-
};
|
|
863
|
-
case "new":
|
|
864
|
-
return {
|
|
865
|
-
...expr,
|
|
866
|
-
callee: processExpression(expr.callee, ctx),
|
|
867
|
-
arguments: expr.arguments.map((a) => processExpression(a, ctx)),
|
|
868
|
-
};
|
|
869
|
-
case "stackalloc":
|
|
870
|
-
return {
|
|
871
|
-
...expr,
|
|
872
|
-
size: processExpression(expr.size, ctx),
|
|
873
|
-
};
|
|
874
|
-
case "defaultof":
|
|
875
|
-
return expr;
|
|
876
|
-
case "templateLiteral":
|
|
877
|
-
return {
|
|
878
|
-
...expr,
|
|
879
|
-
expressions: expr.expressions.map((e) => processExpression(e, ctx)),
|
|
880
|
-
};
|
|
881
|
-
case "arrowFunction": {
|
|
882
|
-
// Create context with arrow function parameters proven
|
|
883
|
-
const arrowCtx = {
|
|
884
|
-
...ctx,
|
|
885
|
-
provenParameters: new Map(ctx.provenParameters),
|
|
886
|
-
provenVariables: new Map(ctx.provenVariables),
|
|
887
|
-
};
|
|
888
|
-
for (const param of expr.parameters) {
|
|
889
|
-
if (param.pattern.kind === "identifierPattern") {
|
|
890
|
-
const numericKind = getNumericKindFromType(param.type);
|
|
891
|
-
if (numericKind !== undefined) {
|
|
892
|
-
arrowCtx.provenParameters.set(param.pattern.name, numericKind);
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
return {
|
|
897
|
-
...expr,
|
|
898
|
-
body: expr.body.kind === "blockStatement"
|
|
899
|
-
? processStatement(expr.body, arrowCtx)
|
|
900
|
-
: processExpression(expr.body, arrowCtx),
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
case "functionExpression": {
|
|
904
|
-
// Create context with function expression parameters proven
|
|
905
|
-
const funcCtx = {
|
|
906
|
-
...ctx,
|
|
907
|
-
provenParameters: new Map(ctx.provenParameters),
|
|
908
|
-
provenVariables: new Map(ctx.provenVariables),
|
|
909
|
-
};
|
|
910
|
-
for (const param of expr.parameters) {
|
|
911
|
-
if (param.pattern.kind === "identifierPattern") {
|
|
912
|
-
const numericKind = getNumericKindFromType(param.type);
|
|
913
|
-
if (numericKind !== undefined) {
|
|
914
|
-
funcCtx.provenParameters.set(param.pattern.name, numericKind);
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
return {
|
|
919
|
-
...expr,
|
|
920
|
-
body: processStatement(expr.body, funcCtx),
|
|
921
|
-
};
|
|
922
|
-
}
|
|
923
|
-
default:
|
|
924
|
-
return expr;
|
|
925
|
-
}
|
|
926
|
-
};
|
|
927
|
-
/**
|
|
928
|
-
* Process a statement, proving numeric narrowings in expressions.
|
|
929
|
-
*/
|
|
930
|
-
const processStatement = (stmt, ctx) => {
|
|
931
|
-
switch (stmt.kind) {
|
|
932
|
-
case "variableDeclaration": {
|
|
933
|
-
const processedDeclarations = stmt.declarations.map((d) => {
|
|
934
|
-
const processedInit = d.initializer
|
|
935
|
-
? processExpression(d.initializer, ctx)
|
|
936
|
-
: undefined;
|
|
937
|
-
// Track proven variables from declarations with known numeric kind
|
|
938
|
-
// This includes:
|
|
939
|
-
// 0. Explicit type annotations (authoritative)
|
|
940
|
-
// 1. numericNarrowing with proof (explicit `as int`)
|
|
941
|
-
// 2. Binary/unary expressions that produce known numeric kinds
|
|
942
|
-
// 3. Identifiers with known numeric types
|
|
943
|
-
// We track both const and let (let can be reassigned, but at init we know the type)
|
|
944
|
-
if (d.name.kind === "identifierPattern") {
|
|
945
|
-
// If a variable has an explicit numeric type annotation, that type is authoritative.
|
|
946
|
-
// We must not "re-prove" it from the initializer, or we'll incorrectly treat
|
|
947
|
-
// `let x: long = 1;` as Int32 (because `1` is an Int32 literal by lexeme).
|
|
948
|
-
const declaredKind = getNumericKindFromType(d.type);
|
|
949
|
-
if (declaredKind !== undefined) {
|
|
950
|
-
ctx.provenVariables.set(d.name.name, declaredKind);
|
|
951
|
-
}
|
|
952
|
-
else if (d.type === undefined && processedInit !== undefined) {
|
|
953
|
-
// First check for explicit numericNarrowing
|
|
954
|
-
if (processedInit.kind === "numericNarrowing" &&
|
|
955
|
-
processedInit.proof !== undefined) {
|
|
956
|
-
ctx.provenVariables.set(d.name.name, processedInit.proof.kind);
|
|
957
|
-
}
|
|
958
|
-
else {
|
|
959
|
-
// Otherwise, try to infer the numeric kind from the expression
|
|
960
|
-
const inferredKind = inferNumericKind(processedInit, ctx);
|
|
961
|
-
if (inferredKind !== undefined) {
|
|
962
|
-
ctx.provenVariables.set(d.name.name, inferredKind);
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
return {
|
|
968
|
-
...d,
|
|
969
|
-
initializer: processedInit,
|
|
970
|
-
};
|
|
971
|
-
});
|
|
972
|
-
return { ...stmt, declarations: processedDeclarations };
|
|
973
|
-
}
|
|
974
|
-
case "functionDeclaration": {
|
|
975
|
-
const paramCtx = {
|
|
976
|
-
...ctx,
|
|
977
|
-
provenParameters: new Map(ctx.provenParameters),
|
|
978
|
-
provenVariables: new Map(ctx.provenVariables),
|
|
979
|
-
};
|
|
980
|
-
for (const param of stmt.parameters) {
|
|
981
|
-
if (param.pattern.kind === "identifierPattern") {
|
|
982
|
-
const numericKind = getNumericKindFromType(param.type);
|
|
983
|
-
if (numericKind !== undefined) {
|
|
984
|
-
paramCtx.provenParameters.set(param.pattern.name, numericKind);
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
return {
|
|
989
|
-
...stmt,
|
|
990
|
-
body: processStatement(stmt.body, paramCtx),
|
|
991
|
-
};
|
|
992
|
-
}
|
|
993
|
-
case "classDeclaration": {
|
|
994
|
-
const processedMembers = stmt.members.map((m) => {
|
|
995
|
-
if (m.kind === "methodDeclaration" && m.body) {
|
|
996
|
-
const methodCtx = {
|
|
997
|
-
...ctx,
|
|
998
|
-
provenParameters: new Map(ctx.provenParameters),
|
|
999
|
-
provenVariables: new Map(ctx.provenVariables),
|
|
1000
|
-
};
|
|
1001
|
-
for (const param of m.parameters) {
|
|
1002
|
-
if (param.pattern.kind === "identifierPattern") {
|
|
1003
|
-
const numericKind = getNumericKindFromType(param.type);
|
|
1004
|
-
if (numericKind !== undefined) {
|
|
1005
|
-
methodCtx.provenParameters.set(param.pattern.name, numericKind);
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
return { ...m, body: processStatement(m.body, methodCtx) };
|
|
1010
|
-
}
|
|
1011
|
-
if (m.kind === "propertyDeclaration" && m.initializer) {
|
|
1012
|
-
return { ...m, initializer: processExpression(m.initializer, ctx) };
|
|
1013
|
-
}
|
|
1014
|
-
if (m.kind === "constructorDeclaration" && m.body) {
|
|
1015
|
-
return { ...m, body: processStatement(m.body, ctx) };
|
|
1016
|
-
}
|
|
1017
|
-
return m;
|
|
1018
|
-
});
|
|
1019
|
-
return { ...stmt, members: processedMembers };
|
|
1020
|
-
}
|
|
1021
|
-
case "expressionStatement":
|
|
1022
|
-
return {
|
|
1023
|
-
...stmt,
|
|
1024
|
-
expression: processExpression(stmt.expression, ctx),
|
|
1025
|
-
};
|
|
1026
|
-
case "returnStatement":
|
|
1027
|
-
return {
|
|
1028
|
-
...stmt,
|
|
1029
|
-
expression: stmt.expression
|
|
1030
|
-
? processExpression(stmt.expression, ctx)
|
|
1031
|
-
: undefined,
|
|
1032
|
-
};
|
|
1033
|
-
case "ifStatement":
|
|
1034
|
-
const processedCondition = processExpression(stmt.condition, ctx);
|
|
1035
|
-
const thenCtx = withInt32ProofsFromTruthyCondition(cloneProofContext(ctx), processedCondition);
|
|
1036
|
-
return {
|
|
1037
|
-
...stmt,
|
|
1038
|
-
condition: processedCondition,
|
|
1039
|
-
thenStatement: processStatement(stmt.thenStatement, thenCtx),
|
|
1040
|
-
elseStatement: stmt.elseStatement
|
|
1041
|
-
? processStatement(stmt.elseStatement, ctx)
|
|
1042
|
-
: undefined,
|
|
1043
|
-
};
|
|
1044
|
-
case "whileStatement":
|
|
1045
|
-
return {
|
|
1046
|
-
...stmt,
|
|
1047
|
-
condition: processExpression(stmt.condition, ctx),
|
|
1048
|
-
body: processStatement(stmt.body, ctx),
|
|
1049
|
-
};
|
|
1050
|
-
case "forStatement":
|
|
1051
|
-
return {
|
|
1052
|
-
...stmt,
|
|
1053
|
-
initializer: stmt.initializer
|
|
1054
|
-
? stmt.initializer.kind === "variableDeclaration"
|
|
1055
|
-
? processStatement(stmt.initializer, ctx)
|
|
1056
|
-
: processExpression(stmt.initializer, ctx)
|
|
1057
|
-
: undefined,
|
|
1058
|
-
condition: stmt.condition
|
|
1059
|
-
? processExpression(stmt.condition, ctx)
|
|
1060
|
-
: undefined,
|
|
1061
|
-
update: stmt.update ? processExpression(stmt.update, ctx) : undefined,
|
|
1062
|
-
body: processStatement(stmt.body, ctx),
|
|
1063
|
-
};
|
|
1064
|
-
case "forOfStatement":
|
|
1065
|
-
return {
|
|
1066
|
-
...stmt,
|
|
1067
|
-
expression: processExpression(stmt.expression, ctx),
|
|
1068
|
-
body: processStatement(stmt.body, ctx),
|
|
1069
|
-
};
|
|
1070
|
-
case "forInStatement":
|
|
1071
|
-
return {
|
|
1072
|
-
...stmt,
|
|
1073
|
-
expression: processExpression(stmt.expression, ctx),
|
|
1074
|
-
body: processStatement(stmt.body, ctx),
|
|
1075
|
-
};
|
|
1076
|
-
case "switchStatement":
|
|
1077
|
-
return {
|
|
1078
|
-
...stmt,
|
|
1079
|
-
expression: processExpression(stmt.expression, ctx),
|
|
1080
|
-
cases: stmt.cases.map((c) => ({
|
|
1081
|
-
...c,
|
|
1082
|
-
test: c.test ? processExpression(c.test, ctx) : undefined,
|
|
1083
|
-
statements: c.statements.map((s) => processStatement(s, ctx)),
|
|
1084
|
-
})),
|
|
1085
|
-
};
|
|
1086
|
-
case "throwStatement":
|
|
1087
|
-
return {
|
|
1088
|
-
...stmt,
|
|
1089
|
-
expression: processExpression(stmt.expression, ctx),
|
|
1090
|
-
};
|
|
1091
|
-
case "tryStatement":
|
|
1092
|
-
return {
|
|
1093
|
-
...stmt,
|
|
1094
|
-
tryBlock: processStatement(stmt.tryBlock, ctx),
|
|
1095
|
-
catchClause: stmt.catchClause
|
|
1096
|
-
? {
|
|
1097
|
-
...stmt.catchClause,
|
|
1098
|
-
body: processStatement(stmt.catchClause.body, ctx),
|
|
1099
|
-
}
|
|
1100
|
-
: undefined,
|
|
1101
|
-
finallyBlock: stmt.finallyBlock
|
|
1102
|
-
? processStatement(stmt.finallyBlock, ctx)
|
|
1103
|
-
: undefined,
|
|
1104
|
-
};
|
|
1105
|
-
case "blockStatement":
|
|
1106
|
-
return {
|
|
1107
|
-
...stmt,
|
|
1108
|
-
statements: stmt.statements.map((s) => processStatement(s, ctx)),
|
|
1109
|
-
};
|
|
1110
|
-
case "yieldStatement":
|
|
1111
|
-
return {
|
|
1112
|
-
...stmt,
|
|
1113
|
-
output: stmt.output ? processExpression(stmt.output, ctx) : undefined,
|
|
1114
|
-
};
|
|
1115
|
-
case "generatorReturnStatement":
|
|
1116
|
-
return {
|
|
1117
|
-
...stmt,
|
|
1118
|
-
expression: stmt.expression
|
|
1119
|
-
? processExpression(stmt.expression, ctx)
|
|
1120
|
-
: undefined,
|
|
1121
|
-
};
|
|
1122
|
-
default:
|
|
1123
|
-
return stmt;
|
|
1124
|
-
}
|
|
1125
|
-
};
|
|
1126
|
-
/**
|
|
1127
|
-
* Run numeric proof pass on a module.
|
|
1128
|
-
*/
|
|
1129
|
-
const processModule = (module) => {
|
|
1130
|
-
const ctx = {
|
|
1131
|
-
filePath: module.filePath,
|
|
1132
|
-
diagnostics: [],
|
|
1133
|
-
provenVariables: new Map(),
|
|
1134
|
-
provenParameters: new Map(),
|
|
1135
|
-
};
|
|
1136
|
-
const processedBody = module.body.map((stmt) => processStatement(stmt, ctx));
|
|
1137
|
-
const processedExports = module.exports.map((exp) => {
|
|
1138
|
-
if (exp.kind === "default") {
|
|
1139
|
-
return { ...exp, expression: processExpression(exp.expression, ctx) };
|
|
1140
|
-
}
|
|
1141
|
-
if (exp.kind === "declaration") {
|
|
1142
|
-
return { ...exp, declaration: processStatement(exp.declaration, ctx) };
|
|
1143
|
-
}
|
|
1144
|
-
return exp;
|
|
1145
|
-
});
|
|
1146
|
-
return {
|
|
1147
|
-
ok: ctx.diagnostics.length === 0,
|
|
1148
|
-
module: {
|
|
1149
|
-
...module,
|
|
1150
|
-
body: processedBody,
|
|
1151
|
-
exports: processedExports,
|
|
1152
|
-
},
|
|
1153
|
-
diagnostics: ctx.diagnostics,
|
|
1154
|
-
};
|
|
1155
|
-
};
|
|
1156
|
-
/**
|
|
1157
|
-
* Run numeric proof validation on all modules.
|
|
1158
|
-
*
|
|
1159
|
-
* HARD GATE: If any diagnostics are returned, the emitter MUST NOT run.
|
|
1160
|
-
* This is not a warning system - unprovable narrowings are compilation errors.
|
|
1161
|
-
*/
|
|
1162
|
-
export const runNumericProofPass = (modules) => {
|
|
1163
|
-
const processedModules = [];
|
|
1164
|
-
const allDiagnostics = [];
|
|
1165
|
-
for (const module of modules) {
|
|
1166
|
-
const result = processModule(module);
|
|
1167
|
-
processedModules.push(result.module);
|
|
1168
|
-
allDiagnostics.push(...result.diagnostics);
|
|
1169
|
-
}
|
|
1170
|
-
return {
|
|
1171
|
-
ok: allDiagnostics.length === 0,
|
|
1172
|
-
modules: processedModules,
|
|
1173
|
-
diagnostics: allDiagnostics,
|
|
1174
|
-
};
|
|
1175
|
-
};
|
|
16
|
+
export { runNumericProofPass, } from "./numeric-proof-walk.js";
|
|
1176
17
|
//# sourceMappingURL=numeric-proof-pass.js.map
|