Commit 34a3fe2
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 bae7ed3 commit 34a3fe2
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 | |
|---|---|---|---|
| |||
3891 | 3891 | | |
3892 | 3892 | | |
3893 | 3893 | | |
| 3894 | + | |
| 3895 | + | |
| 3896 | + | |
3894 | 3897 | | |
3895 | 3898 | | |
3896 | 3899 | | |
| |||
3925 | 3928 | | |
3926 | 3929 | | |
3927 | 3930 | | |
| 3931 | + | |
| 3932 | + | |
| 3933 | + | |
| 3934 | + | |
| 3935 | + | |
| 3936 | + | |
3928 | 3937 | | |
3929 | 3938 | | |
3930 | 3939 | | |
3931 | 3940 | | |
3932 | 3941 | | |
3933 | | - | |
3934 | | - | |
3935 | | - | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
3936 | 3948 | | |
3937 | 3949 | | |
3938 | 3950 | | |
| |||
3950 | 3962 | | |
3951 | 3963 | | |
3952 | 3964 | | |
| 3965 | + | |
3953 | 3966 | | |
3954 | 3967 | | |
3955 | 3968 | | |
3956 | 3969 | | |
3957 | 3970 | | |
| 3971 | + | |
3958 | 3972 | | |
3959 | 3973 | | |
3960 | 3974 | | |
3961 | 3975 | | |
3962 | 3976 | | |
3963 | 3977 | | |
3964 | 3978 | | |
| 3979 | + | |
3965 | 3980 | | |
3966 | 3981 | | |
3967 | 3982 | | |
3968 | 3983 | | |
3969 | 3984 | | |
| 3985 | + | |
3970 | 3986 | | |
3971 | 3987 | | |
3972 | 3988 | | |
| |||
4006 | 4022 | | |
4007 | 4023 | | |
4008 | 4024 | | |
| 4025 | + | |
4009 | 4026 | | |
4010 | 4027 | | |
4011 | 4028 | | |
| |||
4017 | 4034 | | |
4018 | 4035 | | |
4019 | 4036 | | |
| 4037 | + | |
4020 | 4038 | | |
4021 | 4039 | | |
4022 | 4040 | | |
| |||
| 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