Commit 3a259ce
committed
Allow inline matches to bind type variables
Use SmartGADTMap and Constraint#approximation to infer and extract type
values.
Widen pattern-bound types in ProtoTypes so implicit search can find
relevant candidates.
When dropping unused bindings in Inliner, insert type bindings
with a single pre-pass to correctly handle updating singleton types.
Previously Select trees retained old type values, which prevented
pickler roundtripping.1 parent 89496e6 commit 3a259ce
File tree
12 files changed
+348
-158
lines changed- compiler
- src/dotty/tools/dotc
- core
- typer
- test/dotc
- tests
- neg
- pos
12 files changed
+348
-158
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
| 727 | + | |
727 | 728 | | |
728 | 729 | | |
| 730 | + | |
| 731 | + | |
729 | 732 | | |
730 | 733 | | |
731 | 734 | | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
736 | 739 | | |
737 | 740 | | |
738 | 741 | | |
| |||
833 | 836 | | |
834 | 837 | | |
835 | 838 | | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
836 | 845 | | |
837 | 846 | | |
838 | 847 | | |
839 | 848 | | |
840 | 849 | | |
841 | 850 | | |
842 | 851 | | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
843 | 863 | | |
844 | 864 | | |
845 | 865 | | |
| |||
916 | 936 | | |
917 | 937 | | |
918 | 938 | | |
| 939 | + | |
919 | 940 | | |
920 | 941 | | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
921 | 946 | | |
922 | 947 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
| 883 | + | |
883 | 884 | | |
884 | 885 | | |
885 | 886 | | |
| |||
1004 | 1005 | | |
1005 | 1006 | | |
1006 | 1007 | | |
1007 | | - | |
| 1008 | + | |
1008 | 1009 | | |
1009 | 1010 | | |
1010 | 1011 | | |
| |||
1016 | 1017 | | |
1017 | 1018 | | |
1018 | 1019 | | |
1019 | | - | |
| 1020 | + | |
| 1021 | + | |
1020 | 1022 | | |
1021 | 1023 | | |
1022 | 1024 | | |
| |||
1118 | 1120 | | |
1119 | 1121 | | |
1120 | 1122 | | |
1121 | | - | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1122 | 1126 | | |
1123 | 1127 | | |
1124 | 1128 | | |
| |||
1188 | 1192 | | |
1189 | 1193 | | |
1190 | 1194 | | |
1191 | | - | |
| 1195 | + | |
1192 | 1196 | | |
1193 | 1197 | | |
1194 | 1198 | | |
| |||
1428 | 1432 | | |
1429 | 1433 | | |
1430 | 1434 | | |
1431 | | - | |
| 1435 | + | |
1432 | 1436 | | |
1433 | 1437 | | |
1434 | 1438 | | |
| |||
1529 | 1533 | | |
1530 | 1534 | | |
1531 | 1535 | | |
1532 | | - | |
| 1536 | + | |
1533 | 1537 | | |
1534 | 1538 | | |
1535 | 1539 | | |
| |||
0 commit comments