Commit 9f10d77
committed
Refine handling of bottom types in inferredParam
We need to split `notBottom` into two states
- flipBottom the old noBottom: when encountering bottom, maximimze instead
- failBottom when encountering bottom, return false
That way, we can have an inferredParamType which is closer to the old one.
Try first to instantiate the formal type known from the context, but fail on
bottom. If that fails, compute target type and proceed as before.1 parent 914787c commit 9f10d77
File tree
5 files changed
+29
-21
lines changed- compiler/src/dotty/tools/dotc
- core
- typer
5 files changed
+29
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
644 | 645 | | |
645 | 646 | | |
646 | 647 | | |
647 | | - | |
| 648 | + | |
648 | 649 | | |
649 | 650 | | |
650 | 651 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1865 | 1865 | | |
1866 | 1866 | | |
1867 | 1867 | | |
1868 | | - | |
| 1868 | + | |
1869 | 1869 | | |
1870 | 1870 | | |
1871 | 1871 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
514 | 516 | | |
515 | 517 | | |
516 | 518 | | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
521 | 524 | | |
522 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
615 | | - | |
| 615 | + | |
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
| |||
1034 | 1034 | | |
1035 | 1035 | | |
1036 | 1036 | | |
1037 | | - | |
| 1037 | + | |
1038 | 1038 | | |
1039 | 1039 | | |
1040 | 1040 | | |
| |||
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
1052 | | - | |
| 1052 | + | |
| 1053 | + | |
1053 | 1054 | | |
1054 | | - | |
| 1055 | + | |
1055 | 1056 | | |
1056 | | - | |
| 1057 | + | |
1057 | 1058 | | |
1058 | 1059 | | |
1059 | 1060 | | |
1060 | 1061 | | |
1061 | 1062 | | |
1062 | | - | |
| 1063 | + | |
1063 | 1064 | | |
1064 | 1065 | | |
1065 | 1066 | | |
| |||
1069 | 1070 | | |
1070 | 1071 | | |
1071 | 1072 | | |
1072 | | - | |
1073 | | - | |
| 1073 | + | |
| 1074 | + | |
1074 | 1075 | | |
1075 | 1076 | | |
1076 | 1077 | | |
| |||
1079 | 1080 | | |
1080 | 1081 | | |
1081 | 1082 | | |
1082 | | - | |
| 1083 | + | |
1083 | 1084 | | |
1084 | 1085 | | |
1085 | 1086 | | |
| |||
1393 | 1394 | | |
1394 | 1395 | | |
1395 | 1396 | | |
1396 | | - | |
| 1397 | + | |
1397 | 1398 | | |
1398 | 1399 | | |
1399 | 1400 | | |
| |||
3068 | 3069 | | |
3069 | 3070 | | |
3070 | 3071 | | |
3071 | | - | |
| 3072 | + | |
3072 | 3073 | | |
3073 | 3074 | | |
3074 | 3075 | | |
| |||
0 commit comments