Commit 32ac2e6
committed
Avoid even more false negatives in overload pruning
The changes two commits ago were not enough to handle i21410b.scala because we
end up checking:
Tuple.Map[WildcardType(...), List] <: (List[Int], List[String])
which fails because a match type with a wildcard argument apparently only gets
reduced when the match type case is not parameterized.
To handle this more generally we use AvoidWildcardsMap to remove wildcards from
the result type, but since we want to prevent false negatives we start with
`variance = -1` to get a lower-bound instead of an upper-bound.1 parent f7259cf commit 32ac2e6
File tree
2 files changed
+20
-3
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/pos
2 files changed
+20
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2122 | 2122 | | |
2123 | 2123 | | |
2124 | 2124 | | |
2125 | | - | |
2126 | | - | |
| 2125 | + | |
| 2126 | + | |
2127 | 2127 | | |
2128 | 2128 | | |
2129 | 2129 | | |
2130 | 2130 | | |
2131 | 2131 | | |
2132 | 2132 | | |
2133 | 2133 | | |
2134 | | - | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
2135 | 2142 | | |
2136 | 2143 | | |
2137 | 2144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments