Commit 0faa252
committed
A slightly more conservative version of #14128
Two changes
- Fix `hasUpperBound` to work correctly for higher-kinded types
- A more conservative fix in `IsFullyDefinedAccumulator`. We now maintain
the symmetry that
- if variance < 0, we maximize
- if variance > 0 (and Nothing is admissible) we minimize
- only if variance = 0, we use the upper bound as a tie breaker
Previously, we maximized even if variance > 0 if there was an upper but
no lower bound. But that was asymmetric since there is no corresponding
case where we minimize at variance < 0 if there is a lower but no upper
bound.1 parent d0b2151 commit 0faa252
File tree
2 files changed
+11
-2
lines changed- compiler/src/dotty/tools/dotc
- core
- typer
2 files changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
| |||
4896 | 4901 | | |
4897 | 4902 | | |
4898 | 4903 | | |
4899 | | - | |
| 4904 | + | |
4900 | 4905 | | |
4901 | 4906 | | |
4902 | 4907 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
191 | 195 | | |
192 | 196 | | |
193 | 197 | | |
| |||
0 commit comments