Commit bd6801b
committed
Enable one encoding of recursive gadt to work with inline match
If the recursive part is fixed to a subtype of the union of the
cases of the enum, enable inline match to reduce cases.
Notes: this encoding could be supported by a
compiletime.Refract[S] type to split cases of a sum type.1 parent 21aee87 commit bd6801b
File tree
2 files changed
+54
-2
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/run
2 files changed
+54
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
340 | 355 | | |
341 | 356 | | |
342 | 357 | | |
| |||
1003 | 1018 | | |
1004 | 1019 | | |
1005 | 1020 | | |
1006 | | - | |
| 1021 | + | |
1007 | 1022 | | |
1008 | 1023 | | |
1009 | 1024 | | |
| |||
1121 | 1136 | | |
1122 | 1137 | | |
1123 | 1138 | | |
1124 | | - | |
| 1139 | + | |
1125 | 1140 | | |
1126 | 1141 | | |
1127 | 1142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments