Commit 45bfa08
committed
Make applications inside ranges respect variance
A Range, if it survives, will always lead to a situation
where the upper bound appears in a covariant position
in the result, and the lower bound appears in a contravariant
position. Hence, when we apply a type map to the
argument in a range we should take this into account.
Fixes a previous failure in t2435.scala and dependent-extractors.scala.1 parent 416fadc commit 45bfa08
File tree
4 files changed
+29
-8
lines changed- compiler/src/dotty/tools/dotc/core
- tests/pos
4 files changed
+29
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3888 | 3888 | | |
3889 | 3889 | | |
3890 | 3890 | | |
| 3891 | + | |
| 3892 | + | |
| 3893 | + | |
3891 | 3894 | | |
3892 | 3895 | | |
3893 | 3896 | | |
| |||
3922 | 3925 | | |
3923 | 3926 | | |
3924 | 3927 | | |
| 3928 | + | |
| 3929 | + | |
| 3930 | + | |
| 3931 | + | |
| 3932 | + | |
| 3933 | + | |
3925 | 3934 | | |
3926 | 3935 | | |
3927 | 3936 | | |
3928 | 3937 | | |
3929 | 3938 | | |
3930 | | - | |
3931 | | - | |
3932 | | - | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
3933 | 3945 | | |
3934 | 3946 | | |
3935 | 3947 | | |
| |||
3947 | 3959 | | |
3948 | 3960 | | |
3949 | 3961 | | |
| 3962 | + | |
3950 | 3963 | | |
3951 | 3964 | | |
3952 | 3965 | | |
3953 | 3966 | | |
3954 | 3967 | | |
| 3968 | + | |
3955 | 3969 | | |
3956 | 3970 | | |
3957 | 3971 | | |
3958 | 3972 | | |
3959 | 3973 | | |
3960 | 3974 | | |
3961 | 3975 | | |
| 3976 | + | |
3962 | 3977 | | |
3963 | 3978 | | |
3964 | 3979 | | |
3965 | 3980 | | |
3966 | 3981 | | |
| 3982 | + | |
3967 | 3983 | | |
3968 | 3984 | | |
3969 | 3985 | | |
| |||
4003 | 4019 | | |
4004 | 4020 | | |
4005 | 4021 | | |
| 4022 | + | |
4006 | 4023 | | |
4007 | 4024 | | |
4008 | 4025 | | |
| |||
4014 | 4031 | | |
4015 | 4032 | | |
4016 | 4033 | | |
| 4034 | + | |
4017 | 4035 | | |
4018 | 4036 | | |
4019 | 4037 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
0 commit comments