Repository navigation
Commit 6122e9d
committed
fix(bridge): self-referential contextual property leaks into definitions (issue #5)
definitionAndBoundSpan on a property assignment inside a contextually
typed object literal (props options, defineProps type literals) returned
the local assignment AND the contextual member; stock returns only the
member. 19 of the 38 self-site extra-definition keys in the sim-nav
baseline converged; the rest need a tsgo-side getContextualType fix
(next comment on the issue).
Three-link chain, all in the def path:
- The checker shim's getContextualType dropped contextFlags entirely.
tsgo's RPC takes no flags and its union can include the queried node's
own inferred type, so getDefinitionFromObjectLiteralElement's
IgnoreNodeInferences re-query returned the same self-containing union.
Emulate the flag by dropping union constituents whose declarations all
live inside the queried node (handles host nodes and tsgo NodeHandle
declarations), with getNonNullableType overridden on the filtered
delegate so stock's getPropertySymbolsFromContextualType can't reach
back to the unfiltered original.
- Stock's self-referential guard (p.valueDeclaration.name === node)
never fires for tsgo-side property symbols: their declarations are
NodeHandles, so .name identity across ASTs is impossible. Compare
name spans after resolving the handle instead.
Verified: options-api/component.ts:32:4 and
component-name-description/component.vue:12:4 now return exactly
stock's definition set; A-family batch 19/19 of the .ts +
component-meta .vue keys match. Gates: sim-nav 37,409 units
diff 1175 -> 1156 (fixed=19, new=0), sim-xfile 71/71, sim-edit
THROWS 0, f2hl/f2r6/emptyparity/refs-exportspec/display-tokens/
computed-literal PASS, check:lib/enums/sourcefile-guard ok,
volar suite 205/205.1 parent 31026f3 commit 6122e9d
2 files changed
Lines changed: 160 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2043 | 2043 | | |
2044 | 2044 | | |
2045 | 2045 | | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
2046 | 2105 | | |
2047 | 2106 | | |
2048 | 2107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
7649 | 7649 | | |
7650 | 7650 | | |
7651 | 7651 | | |
| 7652 | + | |
| 7653 | + | |
| 7654 | + | |
| 7655 | + | |
| 7656 | + | |
| 7657 | + | |
| 7658 | + | |
| 7659 | + | |
| 7660 | + | |
| 7661 | + | |
| 7662 | + | |
| 7663 | + | |
| 7664 | + | |
| 7665 | + | |
| 7666 | + | |
| 7667 | + | |
| 7668 | + | |
| 7669 | + | |
| 7670 | + | |
| 7671 | + | |
| 7672 | + | |
| 7673 | + | |
| 7674 | + | |
| 7675 | + | |
| 7676 | + | |
| 7677 | + | |
| 7678 | + | |
| 7679 | + | |
| 7680 | + | |
| 7681 | + | |
| 7682 | + | |
| 7683 | + | |
| 7684 | + | |
| 7685 | + | |
| 7686 | + | |
| 7687 | + | |
| 7688 | + | |
| 7689 | + | |
| 7690 | + | |
| 7691 | + | |
| 7692 | + | |
| 7693 | + | |
| 7694 | + | |
| 7695 | + | |
| 7696 | + | |
| 7697 | + | |
| 7698 | + | |
| 7699 | + | |
| 7700 | + | |
| 7701 | + | |
| 7702 | + | |
| 7703 | + | |
| 7704 | + | |
| 7705 | + | |
| 7706 | + | |
| 7707 | + | |
| 7708 | + | |
| 7709 | + | |
| 7710 | + | |
| 7711 | + | |
| 7712 | + | |
| 7713 | + | |
| 7714 | + | |
| 7715 | + | |
| 7716 | + | |
| 7717 | + | |
| 7718 | + | |
| 7719 | + | |
| 7720 | + | |
| 7721 | + | |
| 7722 | + | |
| 7723 | + | |
| 7724 | + | |
| 7725 | + | |
| 7726 | + | |
| 7727 | + | |
| 7728 | + | |
| 7729 | + | |
| 7730 | + | |
| 7731 | + | |
| 7732 | + | |
| 7733 | + | |
| 7734 | + | |
| 7735 | + | |
| 7736 | + | |
| 7737 | + | |
| 7738 | + | |
| 7739 | + | |
7652 | 7740 | | |
7653 | 7741 | | |
7654 | 7742 | | |
| |||
7669 | 7757 | | |
7670 | 7758 | | |
7671 | 7759 | | |
| 7760 | + | |
7672 | 7761 | | |
7673 | 7762 | | |
7674 | 7763 | | |
| |||
8524 | 8613 | | |
8525 | 8614 | | |
8526 | 8615 | | |
8527 | | - | |
| 8616 | + | |
8528 | 8617 | | |
8529 | 8618 | | |
8530 | 8619 | | |
| |||
8553 | 8642 | | |
8554 | 8643 | | |
8555 | 8644 | | |
| 8645 | + | |
| 8646 | + | |
| 8647 | + | |
| 8648 | + | |
| 8649 | + | |
| 8650 | + | |
| 8651 | + | |
| 8652 | + | |
| 8653 | + | |
| 8654 | + | |
8556 | 8655 | | |
8557 | 8656 | | |
8558 | 8657 | | |
| |||
0 commit comments