@tsonic/frontend 0.0.13 → 0.0.15
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/graph/builder.js +2 -2
- package/dist/graph/builder.js.map +1 -1
- package/dist/graph/extraction/imports.js +1 -1
- package/dist/graph/extraction/imports.js.map +1 -1
- package/dist/graph/extraction/orchestrator.d.ts.map +1 -1
- package/dist/graph/extraction/orchestrator.js +1 -1
- package/dist/graph/extraction/orchestrator.js.map +1 -1
- package/dist/ir/binding/index.d.ts +134 -0
- package/dist/ir/binding/index.d.ts.map +1 -0
- package/dist/ir/binding/index.js +725 -0
- package/dist/ir/binding/index.js.map +1 -0
- package/dist/ir/binding-resolution.test.js +193 -52
- package/dist/ir/binding-resolution.test.js.map +1 -1
- package/dist/ir/builder/exports.d.ts +20 -2
- package/dist/ir/builder/exports.d.ts.map +1 -1
- package/dist/ir/builder/exports.js +65 -6
- package/dist/ir/builder/exports.js.map +1 -1
- package/dist/ir/builder/imports.d.ts +9 -5
- package/dist/ir/builder/imports.d.ts.map +1 -1
- package/dist/ir/builder/imports.js +20 -31
- package/dist/ir/builder/imports.js.map +1 -1
- package/dist/ir/builder/orchestrator.d.ts +10 -1
- package/dist/ir/builder/orchestrator.d.ts.map +1 -1
- package/dist/ir/builder/orchestrator.js +25 -14
- package/dist/ir/builder/orchestrator.js.map +1 -1
- package/dist/ir/builder/statements.d.ts +7 -1
- package/dist/ir/builder/statements.d.ts.map +1 -1
- package/dist/ir/builder/statements.js +7 -2
- package/dist/ir/builder/statements.js.map +1 -1
- package/dist/ir/builder/types.d.ts +3 -0
- package/dist/ir/builder/types.d.ts.map +1 -1
- package/dist/ir/builder/validation.d.ts +4 -1
- package/dist/ir/builder/validation.d.ts.map +1 -1
- package/dist/ir/builder/validation.js +37 -37
- package/dist/ir/builder/validation.js.map +1 -1
- package/dist/ir/builder.test.js +54 -111
- package/dist/ir/builder.test.js.map +1 -1
- package/dist/ir/clr-type-mappings.d.ts +42 -0
- package/dist/ir/clr-type-mappings.d.ts.map +1 -0
- package/dist/ir/clr-type-mappings.js +139 -0
- package/dist/ir/clr-type-mappings.js.map +1 -0
- package/dist/ir/converters/anonymous-synthesis.d.ts +30 -8
- package/dist/ir/converters/anonymous-synthesis.d.ts.map +1 -1
- package/dist/ir/converters/anonymous-synthesis.js +46 -55
- package/dist/ir/converters/anonymous-synthesis.js.map +1 -1
- package/dist/ir/converters/context.d.ts +40 -0
- package/dist/ir/converters/context.d.ts.map +1 -0
- package/dist/ir/converters/context.js +24 -0
- package/dist/ir/converters/context.js.map +1 -0
- package/dist/ir/converters/expressions/access.d.ts +6 -1
- package/dist/ir/converters/expressions/access.d.ts.map +1 -1
- package/dist/ir/converters/expressions/access.js +239 -15
- package/dist/ir/converters/expressions/access.js.map +1 -1
- package/dist/ir/converters/expressions/calls.d.ts +24 -3
- package/dist/ir/converters/expressions/calls.d.ts.map +1 -1
- package/dist/ir/converters/expressions/calls.js +450 -385
- package/dist/ir/converters/expressions/calls.js.map +1 -1
- package/dist/ir/converters/expressions/collections.d.ts +16 -3
- package/dist/ir/converters/expressions/collections.d.ts.map +1 -1
- package/dist/ir/converters/expressions/collections.js +300 -46
- package/dist/ir/converters/expressions/collections.js.map +1 -1
- package/dist/ir/converters/expressions/functions.d.ts +10 -3
- package/dist/ir/converters/expressions/functions.d.ts.map +1 -1
- package/dist/ir/converters/expressions/functions.js +140 -32
- package/dist/ir/converters/expressions/functions.js.map +1 -1
- package/dist/ir/converters/expressions/helpers.d.ts +22 -23
- package/dist/ir/converters/expressions/helpers.d.ts.map +1 -1
- package/dist/ir/converters/expressions/helpers.js +242 -239
- package/dist/ir/converters/expressions/helpers.js.map +1 -1
- package/dist/ir/converters/expressions/index.d.ts +1 -1
- package/dist/ir/converters/expressions/index.d.ts.map +1 -1
- package/dist/ir/converters/expressions/index.js +1 -1
- package/dist/ir/converters/expressions/index.js.map +1 -1
- package/dist/ir/converters/expressions/literals.d.ts +12 -12
- package/dist/ir/converters/expressions/literals.d.ts.map +1 -1
- package/dist/ir/converters/expressions/literals.js +62 -17
- package/dist/ir/converters/expressions/literals.js.map +1 -1
- package/dist/ir/converters/expressions/numeric-recovery.test.d.ts +5 -2
- package/dist/ir/converters/expressions/numeric-recovery.test.d.ts.map +1 -1
- package/dist/ir/converters/expressions/numeric-recovery.test.js +62 -49
- package/dist/ir/converters/expressions/numeric-recovery.test.js.map +1 -1
- package/dist/ir/converters/expressions/operators.d.ts +13 -4
- package/dist/ir/converters/expressions/operators.d.ts.map +1 -1
- package/dist/ir/converters/expressions/operators.js +179 -33
- package/dist/ir/converters/expressions/operators.js.map +1 -1
- package/dist/ir/converters/expressions/other.d.ts +11 -3
- package/dist/ir/converters/expressions/other.d.ts.map +1 -1
- package/dist/ir/converters/expressions/other.js +26 -10
- package/dist/ir/converters/expressions/other.js.map +1 -1
- package/dist/ir/converters/statements/control/blocks.d.ts +8 -2
- package/dist/ir/converters/statements/control/blocks.d.ts.map +1 -1
- package/dist/ir/converters/statements/control/blocks.js +7 -2
- package/dist/ir/converters/statements/control/blocks.js.map +1 -1
- package/dist/ir/converters/statements/control/conditionals.d.ts +14 -4
- package/dist/ir/converters/statements/control/conditionals.d.ts.map +1 -1
- package/dist/ir/converters/statements/control/conditionals.js +19 -10
- package/dist/ir/converters/statements/control/conditionals.js.map +1 -1
- package/dist/ir/converters/statements/control/exceptions.d.ts +10 -3
- package/dist/ir/converters/statements/control/exceptions.d.ts.map +1 -1
- package/dist/ir/converters/statements/control/exceptions.js +13 -7
- package/dist/ir/converters/statements/control/exceptions.js.map +1 -1
- package/dist/ir/converters/statements/control/loops.d.ts +16 -5
- package/dist/ir/converters/statements/control/loops.d.ts.map +1 -1
- package/dist/ir/converters/statements/control/loops.js +25 -15
- package/dist/ir/converters/statements/control/loops.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/constructors.d.ts +3 -2
- package/dist/ir/converters/statements/declarations/classes/constructors.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/constructors.js +11 -7
- package/dist/ir/converters/statements/declarations/classes/constructors.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/methods.d.ts +2 -1
- package/dist/ir/converters/statements/declarations/classes/methods.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/methods.js +63 -11
- package/dist/ir/converters/statements/declarations/classes/methods.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/orchestrator.d.ts +2 -1
- package/dist/ir/converters/statements/declarations/classes/orchestrator.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/orchestrator.js +60 -40
- package/dist/ir/converters/statements/declarations/classes/orchestrator.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/override-detection.d.ts +6 -2
- package/dist/ir/converters/statements/declarations/classes/override-detection.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/override-detection.js +49 -50
- package/dist/ir/converters/statements/declarations/classes/override-detection.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/properties.d.ts +9 -1
- package/dist/ir/converters/statements/declarations/classes/properties.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/properties.js +119 -16
- package/dist/ir/converters/statements/declarations/classes/properties.js.map +1 -1
- package/dist/ir/converters/statements/declarations/enums.d.ts +2 -1
- package/dist/ir/converters/statements/declarations/enums.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/enums.js +8 -2
- package/dist/ir/converters/statements/declarations/enums.js.map +1 -1
- package/dist/ir/converters/statements/declarations/functions.d.ts +2 -1
- package/dist/ir/converters/statements/declarations/functions.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/functions.js +11 -6
- package/dist/ir/converters/statements/declarations/functions.js.map +1 -1
- package/dist/ir/converters/statements/declarations/index.d.ts +3 -1
- package/dist/ir/converters/statements/declarations/index.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/index.js +3 -1
- package/dist/ir/converters/statements/declarations/index.js.map +1 -1
- package/dist/ir/converters/statements/declarations/interfaces.d.ts +3 -2
- package/dist/ir/converters/statements/declarations/interfaces.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/interfaces.js +26 -20
- package/dist/ir/converters/statements/declarations/interfaces.js.map +1 -1
- package/dist/ir/converters/statements/declarations/registry.d.ts +72 -0
- package/dist/ir/converters/statements/declarations/registry.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/registry.js +92 -0
- package/dist/ir/converters/statements/declarations/registry.js.map +1 -1
- package/dist/ir/converters/statements/declarations/type-aliases.d.ts +2 -1
- package/dist/ir/converters/statements/declarations/type-aliases.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/type-aliases.js +6 -4
- package/dist/ir/converters/statements/declarations/type-aliases.js.map +1 -1
- package/dist/ir/converters/statements/declarations/variables.d.ts +11 -1
- package/dist/ir/converters/statements/declarations/variables.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/variables.js +123 -19
- package/dist/ir/converters/statements/declarations/variables.js.map +1 -1
- package/dist/ir/converters/statements/declarations.d.ts +4 -1
- package/dist/ir/converters/statements/declarations.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations.js +4 -1
- package/dist/ir/converters/statements/declarations.js.map +1 -1
- package/dist/ir/converters/statements/helpers.d.ts +4 -3
- package/dist/ir/converters/statements/helpers.d.ts.map +1 -1
- package/dist/ir/converters/statements/helpers.js +55 -31
- package/dist/ir/converters/statements/helpers.js.map +1 -1
- package/dist/ir/converters/statements/index.d.ts +1 -1
- package/dist/ir/converters/statements/index.d.ts.map +1 -1
- package/dist/ir/converters/statements/index.js +2 -1
- package/dist/ir/converters/statements/index.js.map +1 -1
- package/dist/ir/expression-converter.d.ts +10 -3
- package/dist/ir/expression-converter.d.ts.map +1 -1
- package/dist/ir/expression-converter.js +150 -56
- package/dist/ir/expression-converter.js.map +1 -1
- package/dist/ir/hierarchical-bindings-e2e.test.js +10 -6
- package/dist/ir/hierarchical-bindings-e2e.test.js.map +1 -1
- package/dist/ir/index.d.ts +5 -0
- package/dist/ir/index.d.ts.map +1 -1
- package/dist/ir/index.js +5 -0
- package/dist/ir/index.js.map +1 -1
- package/dist/ir/no-ts-type-inference.test.d.ts +17 -0
- package/dist/ir/no-ts-type-inference.test.d.ts.map +1 -0
- package/dist/ir/no-ts-type-inference.test.js +171 -0
- package/dist/ir/no-ts-type-inference.test.js.map +1 -0
- package/dist/ir/program-context.d.ts +74 -0
- package/dist/ir/program-context.d.ts.map +1 -0
- package/dist/ir/program-context.js +286 -0
- package/dist/ir/program-context.js.map +1 -0
- package/dist/ir/statement-converter.d.ts +14 -4
- package/dist/ir/statement-converter.d.ts.map +1 -1
- package/dist/ir/statement-converter.js +31 -21
- package/dist/ir/statement-converter.js.map +1 -1
- package/dist/ir/syntax/binding-patterns.d.ts +22 -0
- package/dist/ir/syntax/binding-patterns.d.ts.map +1 -0
- package/dist/ir/syntax/binding-patterns.js +92 -0
- package/dist/ir/syntax/binding-patterns.js.map +1 -0
- package/dist/ir/thisarg-inference.test.d.ts +8 -0
- package/dist/ir/thisarg-inference.test.d.ts.map +1 -0
- package/dist/ir/thisarg-inference.test.js +94 -0
- package/dist/ir/thisarg-inference.test.js.map +1 -0
- package/dist/ir/type-converter.d.ts +5 -2
- package/dist/ir/type-converter.d.ts.map +1 -1
- package/dist/ir/type-converter.js +5 -2
- package/dist/ir/type-converter.js.map +1 -1
- package/dist/ir/type-system/core.d.ts +29 -0
- package/dist/ir/type-system/core.d.ts.map +1 -0
- package/dist/ir/type-system/core.js +456 -0
- package/dist/ir/type-system/core.js.map +1 -0
- package/dist/ir/type-system/index.d.ts +21 -0
- package/dist/ir/type-system/index.d.ts.map +1 -0
- package/dist/ir/type-system/index.js +43 -0
- package/dist/ir/type-system/index.js.map +1 -0
- package/dist/ir/type-system/internal/handle-types.d.ts +98 -0
- package/dist/ir/type-system/internal/handle-types.d.ts.map +1 -0
- package/dist/ir/type-system/internal/handle-types.js +13 -0
- package/dist/ir/type-system/internal/handle-types.js.map +1 -0
- package/dist/ir/type-system/internal/nominal-env.d.ts +66 -0
- package/dist/ir/type-system/internal/nominal-env.d.ts.map +1 -0
- package/dist/ir/type-system/internal/nominal-env.js +301 -0
- package/dist/ir/type-system/internal/nominal-env.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/arrays.d.ts +11 -0
- package/dist/ir/type-system/internal/type-converter/arrays.d.ts.map +1 -0
- package/dist/ir/{type-converter → type-system/internal/type-converter}/arrays.js +2 -2
- package/dist/ir/type-system/internal/type-converter/arrays.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/converter.d.ts +17 -0
- package/dist/ir/type-system/internal/type-converter/converter.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/converter.js +16 -0
- package/dist/ir/type-system/internal/type-converter/converter.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/functions.d.ts +14 -0
- package/dist/ir/type-system/internal/type-converter/functions.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/functions.js +66 -0
- package/dist/ir/type-system/internal/type-converter/functions.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/index.d.ts +11 -0
- package/dist/ir/type-system/internal/type-converter/index.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/index.js +11 -0
- package/dist/ir/type-system/internal/type-converter/index.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/inference.d.ts +37 -0
- package/dist/ir/type-system/internal/type-converter/inference.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/inference.js +32 -0
- package/dist/ir/type-system/internal/type-converter/inference.js.map +1 -0
- package/dist/ir/{type-converter → type-system/internal/type-converter}/literals.d.ts +1 -1
- package/dist/ir/type-system/internal/type-converter/literals.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/literals.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/objects.d.ts +20 -0
- package/dist/ir/type-system/internal/type-converter/objects.d.ts.map +1 -0
- package/dist/ir/{type-converter → type-system/internal/type-converter}/objects.js +56 -6
- package/dist/ir/type-system/internal/type-converter/objects.js.map +1 -0
- package/dist/ir/{type-converter → type-system/internal/type-converter}/orchestrator.d.ts +3 -2
- package/dist/ir/type-system/internal/type-converter/orchestrator.d.ts.map +1 -0
- package/dist/ir/{type-converter → type-system/internal/type-converter}/orchestrator.js +63 -21
- package/dist/ir/type-system/internal/type-converter/orchestrator.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/patterns.d.ts +12 -0
- package/dist/ir/type-system/internal/type-converter/patterns.d.ts.map +1 -0
- package/dist/ir/{type-converter → type-system/internal/type-converter}/patterns.js +22 -6
- package/dist/ir/type-system/internal/type-converter/patterns.js.map +1 -0
- package/dist/ir/{type-converter → type-system/internal/type-converter}/primitives.d.ts +1 -1
- package/dist/ir/type-system/internal/type-converter/primitives.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/primitives.js.map +1 -0
- package/dist/ir/{type-converter → type-system/internal/type-converter}/references.d.ts +3 -2
- package/dist/ir/type-system/internal/type-converter/references.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/references.js +551 -0
- package/dist/ir/type-system/internal/type-converter/references.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/unions-intersections.d.ts +15 -0
- package/dist/ir/type-system/internal/type-converter/unions-intersections.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/unions-intersections.js +22 -0
- package/dist/ir/type-system/internal/type-converter/unions-intersections.js.map +1 -0
- package/dist/ir/{type-converter → type-system/internal/type-converter}/utility-types.d.ts +23 -36
- package/dist/ir/type-system/internal/type-converter/utility-types.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types.js +879 -0
- package/dist/ir/type-system/internal/type-converter/utility-types.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/utility-types.test.d.ts.map +1 -0
- package/dist/ir/{type-converter → type-system/internal/type-converter}/utility-types.test.js +398 -120
- package/dist/ir/type-system/internal/type-converter/utility-types.test.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter.d.ts +9 -0
- package/dist/ir/type-system/internal/type-converter.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter.js +9 -0
- package/dist/ir/type-system/internal/type-converter.js.map +1 -0
- package/dist/ir/type-system/internal/type-registry.d.ts +107 -0
- package/dist/ir/type-system/internal/type-registry.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-registry.js +534 -0
- package/dist/ir/type-system/internal/type-registry.js.map +1 -0
- package/dist/ir/type-system/internal/universe/alias-table.d.ts +92 -0
- package/dist/ir/type-system/internal/universe/alias-table.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/alias-table.js +222 -0
- package/dist/ir/type-system/internal/universe/alias-table.js.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-catalog.d.ts +44 -0
- package/dist/ir/type-system/internal/universe/clr-catalog.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-catalog.js +1176 -0
- package/dist/ir/type-system/internal/universe/clr-catalog.js.map +1 -0
- package/dist/ir/type-system/internal/universe/index.d.ts +26 -0
- package/dist/ir/type-system/internal/universe/index.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/index.js +30 -0
- package/dist/ir/type-system/internal/universe/index.js.map +1 -0
- package/dist/ir/type-system/internal/universe/resolution.d.ts +115 -0
- package/dist/ir/type-system/internal/universe/resolution.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/resolution.js +181 -0
- package/dist/ir/type-system/internal/universe/resolution.js.map +1 -0
- package/dist/ir/type-system/internal/universe/source-catalog.d.ts +62 -0
- package/dist/ir/type-system/internal/universe/source-catalog.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/source-catalog.js +91 -0
- package/dist/ir/type-system/internal/universe/source-catalog.js.map +1 -0
- package/dist/ir/type-system/internal/universe/types.d.ts +436 -0
- package/dist/ir/type-system/internal/universe/types.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/types.js +69 -0
- package/dist/ir/type-system/internal/universe/types.js.map +1 -0
- package/dist/ir/type-system/internal/universe/unified-universe.d.ts +70 -0
- package/dist/ir/type-system/internal/universe/unified-universe.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/unified-universe.js +319 -0
- package/dist/ir/type-system/internal/universe/unified-universe.js.map +1 -0
- package/dist/ir/type-system/type-system.d.ts +617 -0
- package/dist/ir/type-system/type-system.d.ts.map +1 -0
- package/dist/ir/type-system/type-system.js +2420 -0
- package/dist/ir/type-system/type-system.js.map +1 -0
- package/dist/ir/type-system/types.d.ts +176 -0
- package/dist/ir/type-system/types.d.ts.map +1 -0
- package/dist/ir/type-system/types.js +80 -0
- package/dist/ir/type-system/types.js.map +1 -0
- package/dist/ir/type-universe/assembly-catalog.d.ts +44 -0
- package/dist/ir/type-universe/assembly-catalog.d.ts.map +1 -0
- package/dist/ir/type-universe/assembly-catalog.js +532 -0
- package/dist/ir/type-universe/assembly-catalog.js.map +1 -0
- package/dist/ir/type-universe/assembly-catalog.test.d.ts +7 -0
- package/dist/ir/type-universe/assembly-catalog.test.d.ts.map +1 -0
- package/dist/ir/type-universe/assembly-catalog.test.js +105 -0
- package/dist/ir/type-universe/assembly-catalog.test.js.map +1 -0
- package/dist/ir/type-universe/index.d.ts +19 -0
- package/dist/ir/type-universe/index.d.ts.map +1 -0
- package/dist/ir/type-universe/index.js +21 -0
- package/dist/ir/type-universe/index.js.map +1 -0
- package/dist/ir/type-universe/types.d.ts +436 -0
- package/dist/ir/type-universe/types.d.ts.map +1 -0
- package/dist/ir/type-universe/types.js +69 -0
- package/dist/ir/type-universe/types.js.map +1 -0
- package/dist/ir/type-universe/unified-catalog.d.ts +70 -0
- package/dist/ir/type-universe/unified-catalog.d.ts.map +1 -0
- package/dist/ir/type-universe/unified-catalog.js +319 -0
- package/dist/ir/type-universe/unified-catalog.js.map +1 -0
- package/dist/ir/type-universe/unified-catalog.test.d.ts +7 -0
- package/dist/ir/type-universe/unified-catalog.test.d.ts.map +1 -0
- package/dist/ir/type-universe/unified-catalog.test.js +135 -0
- package/dist/ir/type-universe/unified-catalog.test.js.map +1 -0
- package/dist/ir/types/expressions.d.ts +74 -2
- package/dist/ir/types/expressions.d.ts.map +1 -1
- package/dist/ir/types/helpers.d.ts +22 -2
- 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 +1 -0
- package/dist/ir/types/index.js.map +1 -1
- package/dist/ir/types/ir-substitution.d.ts +144 -0
- package/dist/ir/types/ir-substitution.d.ts.map +1 -0
- package/dist/ir/types/ir-substitution.js +569 -0
- package/dist/ir/types/ir-substitution.js.map +1 -0
- package/dist/ir/types/ir-types.d.ts +9 -3
- package/dist/ir/types/ir-types.d.ts.map +1 -1
- package/dist/ir/types/numeric-helpers.d.ts +2 -1
- package/dist/ir/types/numeric-helpers.d.ts.map +1 -1
- package/dist/ir/types/numeric-helpers.js +9 -3
- package/dist/ir/types/numeric-helpers.js.map +1 -1
- package/dist/ir/types/statements.d.ts +13 -1
- package/dist/ir/types/statements.d.ts.map +1 -1
- package/dist/ir/types.d.ts +1 -1
- package/dist/ir/types.d.ts.map +1 -1
- package/dist/ir/types.js.map +1 -1
- package/dist/ir/validation/anonymous-type-lowering-pass.d.ts.map +1 -1
- package/dist/ir/validation/anonymous-type-lowering-pass.js +165 -7
- package/dist/ir/validation/anonymous-type-lowering-pass.js.map +1 -1
- package/dist/ir/validation/arrow-return-finalization-pass.d.ts +28 -0
- package/dist/ir/validation/arrow-return-finalization-pass.d.ts.map +1 -0
- package/dist/ir/validation/arrow-return-finalization-pass.js +416 -0
- package/dist/ir/validation/arrow-return-finalization-pass.js.map +1 -0
- package/dist/ir/validation/attribute-collection-pass.d.ts.map +1 -1
- package/dist/ir/validation/attribute-collection-pass.js +40 -6
- package/dist/ir/validation/attribute-collection-pass.js.map +1 -1
- package/dist/ir/validation/attribute-collection-pass.test.js +43 -36
- package/dist/ir/validation/attribute-collection-pass.test.js.map +1 -1
- 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/numeric-coercion-pass.d.ts +22 -16
- package/dist/ir/validation/numeric-coercion-pass.d.ts.map +1 -1
- package/dist/ir/validation/numeric-coercion-pass.js +159 -51
- package/dist/ir/validation/numeric-coercion-pass.js.map +1 -1
- package/dist/ir/validation/numeric-invariants.test.js +72 -108
- package/dist/ir/validation/numeric-invariants.test.js.map +1 -1
- package/dist/ir/validation/numeric-proof-pass.d.ts.map +1 -1
- package/dist/ir/validation/numeric-proof-pass.js +71 -23
- package/dist/ir/validation/numeric-proof-pass.js.map +1 -1
- package/dist/ir/validation/rest-type-synthesis-pass.d.ts +24 -0
- package/dist/ir/validation/rest-type-synthesis-pass.d.ts.map +1 -0
- package/dist/ir/validation/rest-type-synthesis-pass.js +417 -0
- package/dist/ir/validation/rest-type-synthesis-pass.js.map +1 -0
- package/dist/ir/validation/soundness-gate.d.ts +11 -1
- package/dist/ir/validation/soundness-gate.d.ts.map +1 -1
- package/dist/ir/validation/soundness-gate.js +42 -10
- package/dist/ir/validation/soundness-gate.js.map +1 -1
- package/dist/ir/validation/soundness-gate.test.js +19 -2
- package/dist/ir/validation/soundness-gate.test.js.map +1 -1
- package/dist/ir/validation/virtual-marking-pass.d.ts +16 -0
- package/dist/ir/validation/virtual-marking-pass.d.ts.map +1 -0
- package/dist/ir/validation/virtual-marking-pass.js +77 -0
- package/dist/ir/validation/virtual-marking-pass.js.map +1 -0
- package/dist/ir/validation/yield-lowering-pass.test.js +2 -2
- package/dist/ir/validation/yield-lowering-pass.test.js.map +1 -1
- package/dist/program/bindings.d.ts +28 -0
- package/dist/program/bindings.d.ts.map +1 -1
- package/dist/program/bindings.js +204 -2
- package/dist/program/bindings.js.map +1 -1
- package/dist/program/bindings.test.js +30 -0
- package/dist/program/bindings.test.js.map +1 -1
- package/dist/program/creation.d.ts.map +1 -1
- package/dist/program/creation.js +251 -4
- package/dist/program/creation.js.map +1 -1
- package/dist/program/dependency-graph.d.ts.map +1 -1
- package/dist/program/dependency-graph.js +25 -25
- package/dist/program/dependency-graph.js.map +1 -1
- package/dist/program/diagnostics.d.ts.map +1 -1
- package/dist/program/diagnostics.js +6 -0
- package/dist/program/diagnostics.js.map +1 -1
- package/dist/program/index.d.ts +1 -1
- package/dist/program/index.d.ts.map +1 -1
- package/dist/program/types.d.ts +8 -8
- package/dist/program/types.d.ts.map +1 -1
- package/dist/resolver/clr-bindings-resolver.d.ts +1 -0
- package/dist/resolver/clr-bindings-resolver.d.ts.map +1 -1
- package/dist/resolver/clr-bindings-resolver.js +90 -34
- package/dist/resolver/clr-bindings-resolver.js.map +1 -1
- package/dist/resolver/import-resolution.d.ts +16 -1
- package/dist/resolver/import-resolution.d.ts.map +1 -1
- package/dist/resolver/import-resolution.js +29 -12
- package/dist/resolver/import-resolution.js.map +1 -1
- package/dist/resolver/naming.d.ts +1 -1
- package/dist/resolver/naming.d.ts.map +1 -1
- package/dist/resolver/naming.js +13 -2
- package/dist/resolver/naming.js.map +1 -1
- package/dist/resolver.test.js +4 -0
- package/dist/resolver.test.js.map +1 -1
- package/dist/symbol-table/builder.d.ts +3 -1
- package/dist/symbol-table/builder.d.ts.map +1 -1
- package/dist/symbol-table/builder.js +9 -8
- package/dist/symbol-table/builder.js.map +1 -1
- package/dist/symbol-table/types.d.ts +2 -2
- package/dist/symbol-table/types.d.ts.map +1 -1
- package/dist/types/diagnostic.d.ts +12 -2
- package/dist/types/diagnostic.d.ts.map +1 -1
- package/dist/types/diagnostic.js +5 -1
- package/dist/types/diagnostic.js.map +1 -1
- package/dist/validation/extension-methods.d.ts +17 -0
- package/dist/validation/extension-methods.d.ts.map +1 -0
- package/dist/validation/extension-methods.js +133 -0
- package/dist/validation/extension-methods.js.map +1 -0
- package/dist/validation/generics.d.ts.map +1 -1
- package/dist/validation/generics.js +1 -129
- package/dist/validation/generics.js.map +1 -1
- package/dist/validation/imports.js +1 -1
- package/dist/validation/imports.js.map +1 -1
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +1 -0
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/orchestrator.d.ts.map +1 -1
- package/dist/validation/orchestrator.js +2 -0
- package/dist/validation/orchestrator.js.map +1 -1
- package/dist/validation/static-safety.d.ts +1 -0
- package/dist/validation/static-safety.d.ts.map +1 -1
- package/dist/validation/static-safety.js +366 -96
- package/dist/validation/static-safety.js.map +1 -1
- package/dist/validator.test.js +77 -1
- package/dist/validator.test.js.map +1 -1
- package/package.json +2 -2
- package/dist/ir/type-converter/arrays.d.ts +0 -10
- package/dist/ir/type-converter/arrays.d.ts.map +0 -1
- package/dist/ir/type-converter/arrays.js.map +0 -1
- package/dist/ir/type-converter/converter.d.ts +0 -6
- package/dist/ir/type-converter/converter.d.ts.map +0 -1
- package/dist/ir/type-converter/converter.js +0 -6
- package/dist/ir/type-converter/converter.js.map +0 -1
- package/dist/ir/type-converter/functions.d.ts +0 -10
- package/dist/ir/type-converter/functions.d.ts.map +0 -1
- package/dist/ir/type-converter/functions.js +0 -15
- package/dist/ir/type-converter/functions.js.map +0 -1
- package/dist/ir/type-converter/index.d.ts +0 -7
- package/dist/ir/type-converter/index.d.ts.map +0 -1
- package/dist/ir/type-converter/index.js +0 -7
- package/dist/ir/type-converter/index.js.map +0 -1
- package/dist/ir/type-converter/inference.d.ts +0 -32
- package/dist/ir/type-converter/inference.d.ts.map +0 -1
- package/dist/ir/type-converter/inference.js +0 -297
- package/dist/ir/type-converter/inference.js.map +0 -1
- package/dist/ir/type-converter/literals.d.ts.map +0 -1
- package/dist/ir/type-converter/literals.js.map +0 -1
- package/dist/ir/type-converter/objects.d.ts +0 -16
- package/dist/ir/type-converter/objects.d.ts.map +0 -1
- package/dist/ir/type-converter/objects.js.map +0 -1
- package/dist/ir/type-converter/orchestrator.d.ts.map +0 -1
- package/dist/ir/type-converter/orchestrator.js.map +0 -1
- package/dist/ir/type-converter/patterns.d.ts +0 -10
- package/dist/ir/type-converter/patterns.d.ts.map +0 -1
- package/dist/ir/type-converter/patterns.js.map +0 -1
- package/dist/ir/type-converter/primitives.d.ts.map +0 -1
- package/dist/ir/type-converter/primitives.js.map +0 -1
- package/dist/ir/type-converter/references.d.ts.map +0 -1
- package/dist/ir/type-converter/references.js +0 -371
- package/dist/ir/type-converter/references.js.map +0 -1
- package/dist/ir/type-converter/unions-intersections.d.ts +0 -14
- package/dist/ir/type-converter/unions-intersections.d.ts.map +0 -1
- package/dist/ir/type-converter/unions-intersections.js +0 -22
- package/dist/ir/type-converter/unions-intersections.js.map +0 -1
- package/dist/ir/type-converter/utility-types.d.ts.map +0 -1
- package/dist/ir/type-converter/utility-types.js +0 -528
- package/dist/ir/type-converter/utility-types.js.map +0 -1
- package/dist/ir/type-converter/utility-types.test.d.ts.map +0 -1
- package/dist/ir/type-converter/utility-types.test.js.map +0 -1
- /package/dist/ir/{type-converter → type-system/internal/type-converter}/literals.js +0 -0
- /package/dist/ir/{type-converter → type-system/internal/type-converter}/primitives.js +0 -0
- /package/dist/ir/{type-converter → type-system/internal/type-converter}/utility-types.test.d.ts +0 -0
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* Expression types for IR
|
|
3
3
|
*/
|
|
4
4
|
import { IrType } from "./ir-types.js";
|
|
5
|
-
import { IrParameter, IrPattern, IrBinaryOperator, IrAssignmentOperator } from "./helpers.js";
|
|
5
|
+
import type { IrParameter, IrPattern, IrBinaryOperator, IrAssignmentOperator } from "./helpers.js";
|
|
6
6
|
import { IrBlockStatement } from "./statements.js";
|
|
7
7
|
import { NumericKind } from "./numeric-kind.js";
|
|
8
8
|
import { SourceLocation } from "../../types/diagnostic.js";
|
|
9
|
+
import type { DeclId, SignatureId, MemberId } from "../type-system/types.js";
|
|
9
10
|
/**
|
|
10
11
|
* Base fields shared by all expression types.
|
|
11
12
|
* - inferredType: The type TypeScript infers for this expression
|
|
@@ -17,7 +18,7 @@ export type IrExpressionBase = {
|
|
|
17
18
|
readonly contextualType?: IrType;
|
|
18
19
|
readonly sourceSpan?: SourceLocation;
|
|
19
20
|
};
|
|
20
|
-
export type IrExpression = IrLiteralExpression | IrIdentifierExpression | IrArrayExpression | IrObjectExpression | IrFunctionExpression | IrArrowFunctionExpression | IrMemberExpression | IrCallExpression | IrNewExpression | IrThisExpression | IrUpdateExpression | IrUnaryExpression | IrBinaryExpression | IrLogicalExpression | IrConditionalExpression | IrAssignmentExpression | IrTemplateLiteralExpression | IrSpreadExpression | IrAwaitExpression | IrYieldExpression | IrNumericNarrowingExpression;
|
|
21
|
+
export type IrExpression = IrLiteralExpression | IrIdentifierExpression | IrArrayExpression | IrObjectExpression | IrFunctionExpression | IrArrowFunctionExpression | IrMemberExpression | IrCallExpression | IrNewExpression | IrThisExpression | IrUpdateExpression | IrUnaryExpression | IrBinaryExpression | IrLogicalExpression | IrConditionalExpression | IrAssignmentExpression | IrTemplateLiteralExpression | IrSpreadExpression | IrAwaitExpression | IrYieldExpression | IrNumericNarrowingExpression | IrTypeAssertionExpression | IrTryCastExpression | IrStackAllocExpression;
|
|
21
22
|
export type IrLiteralExpression = {
|
|
22
23
|
readonly kind: "literal";
|
|
23
24
|
readonly value: string | number | boolean | null | undefined;
|
|
@@ -41,6 +42,7 @@ export type IrIdentifierExpression = {
|
|
|
41
42
|
readonly name: string;
|
|
42
43
|
readonly inferredType?: IrType;
|
|
43
44
|
readonly sourceSpan?: SourceLocation;
|
|
45
|
+
readonly declId?: DeclId;
|
|
44
46
|
readonly resolvedClrType?: string;
|
|
45
47
|
readonly resolvedAssembly?: string;
|
|
46
48
|
readonly csharpName?: string;
|
|
@@ -94,6 +96,8 @@ export type IrArrowFunctionExpression = {
|
|
|
94
96
|
readonly body: IrBlockStatement | IrExpression;
|
|
95
97
|
readonly isAsync: boolean;
|
|
96
98
|
readonly inferredType?: IrType;
|
|
99
|
+
/** Contextual type from call site (e.g., array.map callback signature) */
|
|
100
|
+
readonly contextualType?: IrType;
|
|
97
101
|
readonly sourceSpan?: SourceLocation;
|
|
98
102
|
};
|
|
99
103
|
/**
|
|
@@ -115,6 +119,7 @@ export type IrMemberExpression = {
|
|
|
115
119
|
readonly isOptional: boolean;
|
|
116
120
|
readonly inferredType?: IrType;
|
|
117
121
|
readonly sourceSpan?: SourceLocation;
|
|
122
|
+
readonly memberId?: MemberId;
|
|
118
123
|
readonly memberBinding?: {
|
|
119
124
|
readonly assembly: string;
|
|
120
125
|
readonly type: string;
|
|
@@ -123,6 +128,7 @@ export type IrMemberExpression = {
|
|
|
123
128
|
readonly index: number;
|
|
124
129
|
readonly modifier: "ref" | "out" | "in";
|
|
125
130
|
}[];
|
|
131
|
+
readonly isExtensionMethod?: boolean;
|
|
126
132
|
};
|
|
127
133
|
readonly accessKind?: ComputedAccessKind;
|
|
128
134
|
};
|
|
@@ -133,6 +139,7 @@ export type IrCallExpression = {
|
|
|
133
139
|
readonly isOptional: boolean;
|
|
134
140
|
readonly inferredType?: IrType;
|
|
135
141
|
readonly sourceSpan?: SourceLocation;
|
|
142
|
+
readonly signatureId?: SignatureId;
|
|
136
143
|
readonly typeArguments?: readonly IrType[];
|
|
137
144
|
readonly requiresSpecialization?: boolean;
|
|
138
145
|
readonly argumentPassing?: readonly ("value" | "ref" | "out" | "in")[];
|
|
@@ -151,6 +158,7 @@ export type IrNewExpression = {
|
|
|
151
158
|
readonly arguments: readonly (IrExpression | IrSpreadExpression)[];
|
|
152
159
|
readonly inferredType?: IrType;
|
|
153
160
|
readonly sourceSpan?: SourceLocation;
|
|
161
|
+
readonly signatureId?: SignatureId;
|
|
154
162
|
readonly typeArguments?: readonly IrType[];
|
|
155
163
|
readonly requiresSpecialization?: boolean;
|
|
156
164
|
};
|
|
@@ -308,4 +316,68 @@ export type ProofSource = {
|
|
|
308
316
|
readonly type: "variable";
|
|
309
317
|
readonly name: string;
|
|
310
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* Represents a non-numeric type assertion (x as T).
|
|
321
|
+
*
|
|
322
|
+
* This captures the explicit user intent to cast between types.
|
|
323
|
+
* Emits as C# throwing cast: (T)x
|
|
324
|
+
*
|
|
325
|
+
* For safe (nullable) casts, use trycast<T>(x) which creates IrTryCastExpression.
|
|
326
|
+
*
|
|
327
|
+
* Examples:
|
|
328
|
+
* - `obj as Person` → IrTypeAssertionExpression(obj, referenceType(Person))
|
|
329
|
+
* - `value as string` → IrTypeAssertionExpression(value, primitiveType(string))
|
|
330
|
+
*
|
|
331
|
+
* NOTE: Numeric type assertions (`as int`, `as byte`) use IrNumericNarrowingExpression instead.
|
|
332
|
+
*/
|
|
333
|
+
export type IrTypeAssertionExpression = {
|
|
334
|
+
readonly kind: "typeAssertion";
|
|
335
|
+
/** The expression being cast */
|
|
336
|
+
readonly expression: IrExpression;
|
|
337
|
+
/** The target type for the cast */
|
|
338
|
+
readonly targetType: IrType;
|
|
339
|
+
/** Inferred type (same as targetType) */
|
|
340
|
+
readonly inferredType: IrType;
|
|
341
|
+
readonly sourceSpan?: SourceLocation;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* Represents a safe cast operation (trycast<T>(x)).
|
|
345
|
+
*
|
|
346
|
+
* Emits as C# safe cast: x as T
|
|
347
|
+
* Returns T | null (null if cast fails).
|
|
348
|
+
*
|
|
349
|
+
* This is the C# "as" keyword behavior - returns null on failure instead of throwing.
|
|
350
|
+
*
|
|
351
|
+
* Examples:
|
|
352
|
+
* - `trycast<Person>(obj)` → `obj as Person` in C#
|
|
353
|
+
* - `trycast<string>(value)` → `value as string` in C#
|
|
354
|
+
*/
|
|
355
|
+
export type IrTryCastExpression = {
|
|
356
|
+
readonly kind: "trycast";
|
|
357
|
+
/** The expression being cast */
|
|
358
|
+
readonly expression: IrExpression;
|
|
359
|
+
/** The target type for the cast */
|
|
360
|
+
readonly targetType: IrType;
|
|
361
|
+
/** Inferred type is T | null */
|
|
362
|
+
readonly inferredType: IrType;
|
|
363
|
+
readonly sourceSpan?: SourceLocation;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* Represents a stack allocation operation (stackalloc<T>(size)).
|
|
367
|
+
*
|
|
368
|
+
* Emits as C# stackalloc expression: `stackalloc T[size]`.
|
|
369
|
+
*
|
|
370
|
+
* Example:
|
|
371
|
+
* - `stackalloc<int>(256)` → `stackalloc int[256]` in C#
|
|
372
|
+
*/
|
|
373
|
+
export type IrStackAllocExpression = {
|
|
374
|
+
readonly kind: "stackalloc";
|
|
375
|
+
/** Element type allocated on the stack */
|
|
376
|
+
readonly elementType: IrType;
|
|
377
|
+
/** Number of elements to allocate */
|
|
378
|
+
readonly size: IrExpression;
|
|
379
|
+
/** Inferred type is Span<T> */
|
|
380
|
+
readonly inferredType: IrType;
|
|
381
|
+
readonly sourceSpan?: SourceLocation;
|
|
382
|
+
};
|
|
311
383
|
//# sourceMappingURL=expressions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expressions.d.ts","sourceRoot":"","sources":["../../../src/ir/types/expressions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,YAAY,GACpB,mBA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EAAE,YAAY,CAAC;IAC5B,0CAA0C;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,+BAA+B;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC;CACtC,CAAC"}
|
|
@@ -2,16 +2,28 @@
|
|
|
2
2
|
* Supporting types (patterns, parameters, operators, accessibility, etc.)
|
|
3
3
|
*/
|
|
4
4
|
import { IrType, IrAttribute } from "./ir-types.js";
|
|
5
|
-
import { IrExpression } from "./expressions.js";
|
|
5
|
+
import type { IrExpression } from "./expressions.js";
|
|
6
6
|
export type IrPattern = IrIdentifierPattern | IrArrayPattern | IrObjectPattern;
|
|
7
7
|
export type IrIdentifierPattern = {
|
|
8
8
|
readonly kind: "identifierPattern";
|
|
9
9
|
readonly name: string;
|
|
10
10
|
readonly type?: IrType;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Element in an array destructuring pattern.
|
|
14
|
+
* Can contain a pattern, optional default expression, and rest marker.
|
|
15
|
+
*/
|
|
16
|
+
export type IrArrayPatternElement = {
|
|
17
|
+
readonly pattern: IrPattern;
|
|
18
|
+
/** Default value expression if element is missing/undefined */
|
|
19
|
+
readonly defaultExpr?: IrExpression;
|
|
20
|
+
/** True if this is a rest element: [...rest] */
|
|
21
|
+
readonly isRest?: boolean;
|
|
22
|
+
};
|
|
12
23
|
export type IrArrayPattern = {
|
|
13
24
|
readonly kind: "arrayPattern";
|
|
14
|
-
|
|
25
|
+
/** Elements in the pattern. undefined represents holes (elisions). */
|
|
26
|
+
readonly elements: readonly (IrArrayPatternElement | undefined)[];
|
|
15
27
|
};
|
|
16
28
|
export type IrObjectPattern = {
|
|
17
29
|
readonly kind: "objectPattern";
|
|
@@ -22,9 +34,15 @@ export type IrObjectPatternProperty = {
|
|
|
22
34
|
readonly key: string;
|
|
23
35
|
readonly value: IrPattern;
|
|
24
36
|
readonly shorthand: boolean;
|
|
37
|
+
/** Default value expression if property is missing/undefined */
|
|
38
|
+
readonly defaultExpr?: IrExpression;
|
|
25
39
|
} | {
|
|
26
40
|
readonly kind: "rest";
|
|
27
41
|
readonly pattern: IrPattern;
|
|
42
|
+
/** Computed remaining members from RHS type (for rest type synthesis) */
|
|
43
|
+
readonly restShapeMembers?: readonly IrInterfaceMember[];
|
|
44
|
+
/** Name of synthesized type for rest object */
|
|
45
|
+
readonly restSynthTypeName?: string;
|
|
28
46
|
};
|
|
29
47
|
export type IrTypeParameter = {
|
|
30
48
|
readonly kind: "typeParameter";
|
|
@@ -43,6 +61,8 @@ export type IrParameter = {
|
|
|
43
61
|
readonly isOptional: boolean;
|
|
44
62
|
readonly isRest: boolean;
|
|
45
63
|
readonly passing: "value" | "ref" | "out" | "in";
|
|
64
|
+
/** True when this parameter is the extension-method receiver (`this` parameter in C#). */
|
|
65
|
+
readonly isExtensionReceiver?: boolean;
|
|
46
66
|
/** C# attributes to emit before the parameter */
|
|
47
67
|
readonly attributes?: readonly IrAttribute[];
|
|
48
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/ir/types/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/ir/types/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMrD,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,cAAc,GAAG,eAAe,CA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IACtB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACrD,QAAQ,CAAC,UAAU,EAAE,SAAS,WAAW,EAAE,CAAC;IAC5C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAMF,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAEjE,MAAM,MAAM,gBAAgB,GACxB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,GAAG,GACH,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,GAAG,GACH,GAAG,GACH,GAAG,GACH,IAAI,GACJ,YAAY,CAAC;AAEjB,MAAM,MAAM,oBAAoB,GAC5B,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,GACL,MAAM,GACN,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,CAAC"}
|
package/dist/ir/types/index.d.ts
CHANGED
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export type { IrModule, IrImport, IrImportSpecifier, IrExport, } from "./module.js";
|
|
6
6
|
export type { IrStatement, IrVariableDeclaration, IrVariableDeclarator, IrFunctionDeclaration, IrClassDeclaration, IrClassMember, IrMethodDeclaration, IrPropertyDeclaration, IrConstructorDeclaration, IrInterfaceDeclaration, IrEnumDeclaration, IrEnumMember, IrTypeAliasDeclaration, IrExpressionStatement, IrReturnStatement, IrIfStatement, IrWhileStatement, IrForStatement, IrForOfStatement, IrSwitchStatement, IrSwitchCase, IrThrowStatement, IrTryStatement, IrCatchClause, IrBlockStatement, IrBreakStatement, IrContinueStatement, IrEmptyStatement, IrYieldStatement, IrGeneratorReturnStatement, } from "./statements.js";
|
|
7
|
-
export type { IrExpression, IrLiteralExpression, IrIdentifierExpression, IrArrayExpression, IrObjectExpression, IrObjectProperty, IrFunctionExpression, IrArrowFunctionExpression, IrMemberExpression, IrCallExpression, IrNewExpression, IrThisExpression, IrUpdateExpression, IrUnaryExpression, IrBinaryExpression, IrLogicalExpression, IrConditionalExpression, IrAssignmentExpression, IrTemplateLiteralExpression, IrSpreadExpression, IrAwaitExpression, IrYieldExpression, IrNumericNarrowingExpression, NumericProof, ProofSource, ComputedAccessKind, } from "./expressions.js";
|
|
7
|
+
export type { IrExpression, IrLiteralExpression, IrIdentifierExpression, IrArrayExpression, IrObjectExpression, IrObjectProperty, IrFunctionExpression, IrArrowFunctionExpression, IrMemberExpression, IrCallExpression, IrNewExpression, IrThisExpression, IrUpdateExpression, IrUnaryExpression, IrBinaryExpression, IrLogicalExpression, IrConditionalExpression, IrAssignmentExpression, IrTemplateLiteralExpression, IrSpreadExpression, IrAwaitExpression, IrYieldExpression, IrNumericNarrowingExpression, IrTypeAssertionExpression, IrTryCastExpression, IrStackAllocExpression, NumericProof, ProofSource, ComputedAccessKind, } from "./expressions.js";
|
|
8
8
|
export type { IrType, IrPrimitiveType, IrReferenceType, IrTypeParameterType, IrArrayType, IrTupleType, IrFunctionType, IrObjectType, IrDictionaryType, IrUnionType, IrIntersectionType, IrLiteralType, IrAnyType, IrUnknownType, IrVoidType, IrNeverType, IrAttribute, IrAttributeArg, } from "./ir-types.js";
|
|
9
|
-
export type { IrPattern, IrIdentifierPattern, IrArrayPattern, IrObjectPattern, IrObjectPatternProperty, IrTypeParameter, IrParameter, IrInterfaceMember, IrPropertySignature, IrMethodSignature, IrAccessibility, IrBinaryOperator, IrAssignmentOperator, } from "./helpers.js";
|
|
9
|
+
export type { IrPattern, IrIdentifierPattern, IrArrayPattern, IrArrayPatternElement, IrObjectPattern, IrObjectPatternProperty, IrTypeParameter, IrParameter, IrInterfaceMember, IrPropertySignature, IrMethodSignature, IrAccessibility, IrBinaryOperator, IrAssignmentOperator, } from "./helpers.js";
|
|
10
10
|
export { isStatement, isExpression } from "./guards.js";
|
|
11
11
|
export type { NumericKind } from "./numeric-kind.js";
|
|
12
12
|
export { TSONIC_TO_NUMERIC_KIND, NUMERIC_KIND_TO_CSHARP, NUMERIC_RANGES, isIntegerKind, isSignedKind, getBinaryResultKind, literalFitsInKind, isWideningConversion, } from "./numeric-kind.js";
|
|
13
13
|
export { isValidIntegerLexeme, parseBigIntFromRaw, bigIntFitsInKind, inferNumericKindFromRaw, } from "./numeric-helpers.js";
|
|
14
|
+
export type { TypeSubstitutionMap, SubstitutionResult, CompleteSubstitution, CompleteSubstitutionResult, } from "./ir-substitution.js";
|
|
15
|
+
export { containsTypeParameter, unify, typesEqual, substituteIrType, buildIrSubstitutionMap, buildSubstitutionFromExplicitTypeArgs, buildSubstitutionFromArguments, buildCompleteSubstitutionMap, } from "./ir-substitution.js";
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ir/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,QAAQ,GACT,MAAM,aAAa,CAAC;AAGrB,YAAY,EACV,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,sBAA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AO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ir/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,QAAQ,GACT,MAAM,aAAa,CAAC;AAGrB,YAAY,EACV,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,4BAA4B,EAC5B,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,YAAY,EACZ,WAAW,EACX,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EACV,MAAM,EACN,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,aAAa,EACb,UAAU,EACV,WAAW,EAEX,WAAW,EACX,cAAc,GACf,MAAM,eAAe,CAAC;AAGvB,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGxD,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,sBAAsB,EACtB,qCAAqC,EACrC,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC"}
|
package/dist/ir/types/index.js
CHANGED
|
@@ -7,4 +7,5 @@ export { isStatement, isExpression } from "./guards.js";
|
|
|
7
7
|
export { TSONIC_TO_NUMERIC_KIND, NUMERIC_KIND_TO_CSHARP, NUMERIC_RANGES, isIntegerKind, isSignedKind, getBinaryResultKind, literalFitsInKind, isWideningConversion, } from "./numeric-kind.js";
|
|
8
8
|
// Numeric helpers (literal type inference)
|
|
9
9
|
export { isValidIntegerLexeme, parseBigIntFromRaw, bigIntFitsInKind, inferNumericKindFromRaw, } from "./numeric-helpers.js";
|
|
10
|
+
export { containsTypeParameter, unify, typesEqual, substituteIrType, buildIrSubstitutionMap, buildSubstitutionFromExplicitTypeArgs, buildSubstitutionFromArguments, buildCompleteSubstitutionMap, } from "./ir-substitution.js";
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ir/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ir/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsHH,cAAc;AACd,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIxD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAE3B,2CAA2C;AAC3C,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAS9B,OAAO,EACL,qBAAqB,EACrB,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,sBAAsB,EACtB,qCAAqC,EACrC,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IR Type Substitution Module
|
|
3
|
+
*
|
|
4
|
+
* Provides deterministic type substitution at the IR level.
|
|
5
|
+
* This replaces TypeNode-based substitution with pure IR operations,
|
|
6
|
+
* ensuring CLR type aliases are preserved through generic instantiation.
|
|
7
|
+
*
|
|
8
|
+
* Key functions:
|
|
9
|
+
* - containsTypeParameter: Check if a type contains any type parameters
|
|
10
|
+
* - unify: Match formal type parameters with actual types
|
|
11
|
+
* - substituteIrType: Apply type parameter substitutions
|
|
12
|
+
*/
|
|
13
|
+
import type { IrType } from "./ir-types.js";
|
|
14
|
+
/**
|
|
15
|
+
* Check if an IrType contains any type parameters (typeParameterType).
|
|
16
|
+
*
|
|
17
|
+
* Used to determine if a type needs substitution.
|
|
18
|
+
* For example:
|
|
19
|
+
* - `int` → false (no type parameters)
|
|
20
|
+
* - `T` → true (is a type parameter)
|
|
21
|
+
* - `List<T>` → true (contains type parameter)
|
|
22
|
+
* - `List<int>` → false (fully instantiated)
|
|
23
|
+
*/
|
|
24
|
+
export declare const containsTypeParameter: (type: IrType) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Type substitution map: type parameter name → concrete IrType
|
|
27
|
+
*/
|
|
28
|
+
export type TypeSubstitutionMap = ReadonlyMap<string, IrType>;
|
|
29
|
+
/**
|
|
30
|
+
* Result of substitution building - either success with map, or conflict error.
|
|
31
|
+
* Conflicts occur when the same type parameter binds to different types.
|
|
32
|
+
*/
|
|
33
|
+
export type SubstitutionResult = {
|
|
34
|
+
readonly ok: true;
|
|
35
|
+
readonly map: TypeSubstitutionMap;
|
|
36
|
+
} | {
|
|
37
|
+
readonly ok: false;
|
|
38
|
+
readonly conflict: {
|
|
39
|
+
readonly param: string;
|
|
40
|
+
readonly type1: IrType;
|
|
41
|
+
readonly type2: IrType;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Unify a formal type (with type parameters) against an actual type (instantiated).
|
|
46
|
+
*
|
|
47
|
+
* Returns a substitution map if unification succeeds, undefined if it fails.
|
|
48
|
+
*
|
|
49
|
+
* Examples:
|
|
50
|
+
* - unify(T, int) → { "T" → int }
|
|
51
|
+
* - unify(List<T>, List<int>) → { "T" → int }
|
|
52
|
+
* - unify(Map<K, V>, Map<string, int>) → { "K" → string, "V" → int }
|
|
53
|
+
* - unify(int, string) → undefined (no type parameters to match)
|
|
54
|
+
*
|
|
55
|
+
* The unification is one-way: we're matching the formal type's shape against
|
|
56
|
+
* the actual type and extracting bindings for type parameters found in formal.
|
|
57
|
+
*/
|
|
58
|
+
export declare const unify: (formal: IrType, actual: IrType) => TypeSubstitutionMap | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Check if two IrTypes are structurally equal.
|
|
61
|
+
*/
|
|
62
|
+
export declare const typesEqual: (a: IrType, b: IrType) => boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Apply type parameter substitutions to an IrType.
|
|
65
|
+
*
|
|
66
|
+
* Given a type with type parameters and a substitution map,
|
|
67
|
+
* returns a new type with all type parameters replaced.
|
|
68
|
+
*
|
|
69
|
+
* Examples:
|
|
70
|
+
* - substituteIrType(T, { "T" → int }) → int
|
|
71
|
+
* - substituteIrType(List<T>, { "T" → int }) → List<int>
|
|
72
|
+
* - substituteIrType(T | null, { "T" → int }) → int | null
|
|
73
|
+
*
|
|
74
|
+
* If no substitutions apply, returns the original type unchanged.
|
|
75
|
+
*/
|
|
76
|
+
export declare const substituteIrType: (type: IrType, substitutions: TypeSubstitutionMap) => IrType;
|
|
77
|
+
/**
|
|
78
|
+
* Build IR substitution map from a receiver's type and the formal type parameters.
|
|
79
|
+
*
|
|
80
|
+
* Given a receiver like `list: List<int>` and a formal interface with type parameter T,
|
|
81
|
+
* returns { "T" → int }.
|
|
82
|
+
*
|
|
83
|
+
* This is the IR-level equivalent of buildTypeParameterSubstitutionMap from calls.ts,
|
|
84
|
+
* but works entirely at the IR level without TS AST archaeology.
|
|
85
|
+
*/
|
|
86
|
+
export declare const buildIrSubstitutionMap: (receiverType: IrType, formalTypeParams: readonly string[]) => TypeSubstitutionMap | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Build substitution map from explicit call type arguments.
|
|
89
|
+
*
|
|
90
|
+
* For a call like `identity<int>(x)` with formal type param `T`,
|
|
91
|
+
* returns { "T" → int }.
|
|
92
|
+
*
|
|
93
|
+
* This is binding source #2: explicit type arguments in the call.
|
|
94
|
+
*/
|
|
95
|
+
export declare const buildSubstitutionFromExplicitTypeArgs: (explicitTypeArgs: readonly IrType[], formalTypeParams: readonly string[]) => TypeSubstitutionMap | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Build substitution map from call arguments via bounded unification.
|
|
98
|
+
*
|
|
99
|
+
* For a call like `identity(a)` where `a: int` and formal param is `x: T`,
|
|
100
|
+
* returns { "T" → int }.
|
|
101
|
+
*
|
|
102
|
+
* This is binding source #3: argument-driven unification.
|
|
103
|
+
* No body analysis - just matches argument types against parameter types.
|
|
104
|
+
*
|
|
105
|
+
* Returns SubstitutionResult to detect conflicts (TSN5202):
|
|
106
|
+
* - If T binds to `int` from arg0 and `long` from arg1, returns conflict error
|
|
107
|
+
*/
|
|
108
|
+
export declare const buildSubstitutionFromArguments: (argTypes: readonly (IrType | undefined)[], formalParamTypes: readonly (IrType | undefined)[]) => SubstitutionResult;
|
|
109
|
+
/**
|
|
110
|
+
* Complete substitution with separate maps for receiver and call type params.
|
|
111
|
+
* This avoids name collisions between class type params (T in List<T>)
|
|
112
|
+
* and method type params (T in Select<T>).
|
|
113
|
+
*/
|
|
114
|
+
export type CompleteSubstitution = {
|
|
115
|
+
readonly receiverSubst: TypeSubstitutionMap;
|
|
116
|
+
readonly callSubst: TypeSubstitutionMap;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Result of building complete substitution - success or conflict error.
|
|
120
|
+
*/
|
|
121
|
+
export type CompleteSubstitutionResult = {
|
|
122
|
+
readonly ok: true;
|
|
123
|
+
readonly substitution: CompleteSubstitution;
|
|
124
|
+
} | {
|
|
125
|
+
readonly ok: false;
|
|
126
|
+
readonly conflict: {
|
|
127
|
+
readonly param: string;
|
|
128
|
+
readonly type1: IrType;
|
|
129
|
+
readonly type2: IrType;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Build complete substitution map from all 3 binding sources.
|
|
134
|
+
*
|
|
135
|
+
* Keeps receiver and call substitutions SEPARATE to avoid name collisions.
|
|
136
|
+
*
|
|
137
|
+
* Priority order for call substitutions:
|
|
138
|
+
* 1. Explicit call type arguments (e.g., `identity<int>(x)` → T=int)
|
|
139
|
+
* 2. Argument-driven unification (e.g., `identity(a:int)` → T=int)
|
|
140
|
+
*
|
|
141
|
+
* Receiver substitutions are separate and used for instantiating member signatures.
|
|
142
|
+
*/
|
|
143
|
+
export declare const buildCompleteSubstitutionMap: (receiverType: IrType | undefined, receiverFormalTypeParams: readonly string[], explicitTypeArgs: readonly IrType[], callFormalTypeParams: readonly string[], argTypes: readonly (IrType | undefined)[], formalParamTypes: readonly (IrType | undefined)[]) => CompleteSubstitutionResult;
|
|
144
|
+
//# sourceMappingURL=ir-substitution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ir-substitution.d.ts","sourceRoot":"","sources":["../../../src/ir/types/ir-substitution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,OAyDpD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9D;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,mBAAmB,CAAA;CAAE,GACxD;IACE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,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