Commit f432d08
committed
Be more specific about higher-kinded types in provablyDisjoint.
Previously the disjointnessBoundary of HKTypeLambda's was
implicitly their `resultType`, through the use of
`superTypeNormalized`. This was fine as long as both sides of
`provablyDisjoint` ended up being HKTypeLambda's at the same time,
but this may not always be the case (notably with any-kinded types).
It is safer to consider type lambdas as boundaries themselves, and
explicitly recurse on the result types when arities match.
This change surfaced a weird case in `TypeTestsCasts`, which called
`provablyDisjoint` with ill-kinded types. We now explicitly apply
what I suspect are partially-erased types to wildcards to recover
appropriate kinds.1 parent 1b2a16e commit f432d08
File tree
2 files changed
+17
-1
lines changed- compiler/src/dotty/tools/dotc
- core
- transform
2 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2820 | 2820 | | |
2821 | 2821 | | |
2822 | 2822 | | |
| 2823 | + | |
2823 | 2824 | | |
2824 | 2825 | | |
2825 | 2826 | | |
| |||
2840 | 2841 | | |
2841 | 2842 | | |
2842 | 2843 | | |
| 2844 | + | |
| 2845 | + | |
2843 | 2846 | | |
2844 | 2847 | | |
2845 | 2848 | | |
| |||
2865 | 2868 | | |
2866 | 2869 | | |
2867 | 2870 | | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
2868 | 2880 | | |
2869 | 2881 | | |
2870 | 2882 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
0 commit comments