Commit 2e0198c
committed
Merge castwide#1228: allow arguments to satisfy RBS interface-typed parameters
castwide#1228 fixes the same underlying bug as the already-merged
castwide#1266 (issue castwide#1227: RBS 4.1's Hash#fetch takes its
key as the Hash::_Key duck-type interface instead of a generic,
causing Solargraph to fall back to the unresolved generic<X> from the
block-form overload) but via a different, earlier mechanism: a blanket
:allow_unmatched_interface bypass in Pin::Parameter#compatible_arg?,
rather than castwide#1266's later structural Conformance check.
Verified castwide#1228's own regression test already passes unmodified on
this branch without its compatible_arg? change (isolated it into a
standalone spec file and ran it against HEAD before resolving the
conflict) - castwide#1266's structural interface verification already covers
this case, making castwide#1228's code change redundant here. Kept HEAD's
compatible_arg? as-is (including literal_arg_matches?, from an
earlier-merged PR that castwide#1228's branch, based directly on
castwide/master, never saw) and dropped castwide#1228's interface-bypass hunk
entirely.
Conflict in spec/type_checker/levels/strong_spec.rb: kept castwide#1228's new
regression test (issue castwide#1227) as a sibling of HEAD's intersection-type
test block (from castwide#1231), which castwide#1228's branch also never saw.
.github/workflows/rspec.yml auto-merged cleanly, taking castwide#1228's RBS
matrix bump (4.0.0/4.0.1/4.0.2 -> 3.10.0/4.0.3/4.1.1) - core to what
this PR is actually testing (RBS 4.1's Hash#fetch signature change).
Verified: spec/type_checker/levels/strong_spec.rb, spec/pin/parameter_spec.rb
(104 examples, 0 failures, 5 pending), and a broader safety net -
spec/type_checker, spec/source, spec/source_map/clip_spec.rb,
spec/complex_type, spec/complex_type_spec.rb (807 examples, 0
failures, 35 pending) - all passing locally.2 files changed
Lines changed: 33 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 33 | + | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1294 | 1324 | | |
1295 | 1325 | | |
0 commit comments