Commit 110c91f
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 555df53 commit 110c91f
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 | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
| |||
4813 | 4818 | | |
4814 | 4819 | | |
4815 | 4820 | | |
4816 | | - | |
| 4821 | + | |
4817 | 4822 | | |
4818 | 4823 | | |
4819 | 4824 | | |
| |||
| 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