Commit 29a1887
committed
Restore full bypass for the interface-typed expectation case
Moving the structural check into erased_type_conforms? let generic
interfaces (e.g. _Each[Elem], _ToAry[T]) fall through into the
subsequent subtype/parameter comparison, which isn't
generic-parameter-aware for interfaces (see issue castwide#1267) and could
wrongly reject a match the old blanket bypass would have allowed.
Move the check back to where the old ignore_interface? ran, at the
top of conforms_to_unique_type?, so once the interface question is
settled (now via the real structural verdict, with
:allow_unmatched_interface as fallback), nothing downstream runs -
matching the old bypass's shape exactly, just with a real verdict
behind it instead of a blind rule check.
Verified against castwide/solargraph's own downstream
solargraph-rspec integration suite (run_solargraph_rspec_specs
CI job): its 3 pre-existing failures (Array<Integer> => Array
generic-loss cases) reproduce identically on unmodified
castwide/master at the exact commit this branch forked from, so
they're unrelated to this PR either way - this commit is a
defensive correctness fix, not a regression fix.1 parent 2a62989 commit 29a1887
1 file changed
Lines changed: 31 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
97 | 119 | | |
98 | 120 | | |
99 | 121 | | |
| |||
109 | 131 | | |
110 | 132 | | |
111 | 133 | | |
112 | | - | |
113 | | - | |
114 | 134 | | |
115 | 135 | | |
116 | 136 | | |
| |||
134 | 154 | | |
135 | 155 | | |
136 | 156 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
| |||
0 commit comments