Commit 3991198
committed
Fix type test warning involving applied types
Previously, the check relied used `maximizeType`, which means that
depending on which bound got picked by type inference, the check might
fail. Instead, we only need to check if there is a possible constraint
solution by making sure both subtype tests return true.
I'm not sure if this is always a safe type test, but it at least avoids
spurious warnings. This is necessary to bootstrap dotty after the
previous commit which added a `dealias` to `recur`, this probably means that there
are other situations where `recur` is missing checks.1 parent aeeb14b commit 3991198
File tree
2 files changed
+12
-8
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/pos-special/fatal-warnings
2 files changed
+12
-8
lines changedLines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 108 | + | |
114 | 109 | | |
115 | 110 | | |
116 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments