Commit 53098f7
committed
fix(semantic): don't ICE on a wrong generic-argument count through a local use alias
`specialize_generic_statement_arg` unwrapped the `Maybe` returned by
`specialize_generic_module_item`, which errors on e.g. `TooManyGenericArguments`.
Every sibling resolution path propagates that error with `?`; only the
statement-`use` path (`ResolvedBase::StatementEnvironment`) unwrapped, so
`use Pair as P; P::<felt252, u8, u16> { .. }` panicked instead of emitting E2163.
Return `Maybe` and propagate with `?`.1 parent daff9bc commit 53098f7
2 files changed
Lines changed: 37 additions & 12 deletions
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1651 | 1651 | | |
1652 | 1652 | | |
1653 | 1653 | | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1560 | 1560 | | |
1561 | 1561 | | |
1562 | 1562 | | |
1563 | | - | |
| 1563 | + | |
1564 | 1564 | | |
1565 | | - | |
1566 | | - | |
1567 | | - | |
1568 | | - | |
1569 | | - | |
1570 | | - | |
1571 | | - | |
1572 | | - | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
1573 | 1571 | | |
1574 | 1572 | | |
1575 | 1573 | | |
1576 | 1574 | | |
1577 | 1575 | | |
1578 | 1576 | | |
1579 | | - | |
| 1577 | + | |
1580 | 1578 | | |
1581 | 1579 | | |
1582 | 1580 | | |
| |||
1899 | 1897 | | |
1900 | 1898 | | |
1901 | 1899 | | |
1902 | | - | |
| 1900 | + | |
1903 | 1901 | | |
1904 | 1902 | | |
1905 | 1903 | | |
| |||
1974 | 1972 | | |
1975 | 1973 | | |
1976 | 1974 | | |
1977 | | - | |
| 1975 | + | |
1978 | 1976 | | |
1979 | 1977 | | |
1980 | 1978 | | |
| |||
0 commit comments