Commit 7722fa9
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 7722fa9
File tree
2 files changed
+10
-6
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/pos-special/fatal-warnings
2 files changed
+10
-6
lines changedLines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
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