Skip to content

Commit 3b60c3b

Browse files
committed
Revert "Make prefix covariant in type maps."
This reverts commit 0a48b2a.
1 parent 0a48b2a commit 3b60c3b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/dotty/tools/dotc/core/Types.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2884,7 +2884,13 @@ object Types {
28842884
tp match {
28852885
case tp: NamedType =>
28862886
if (stopAtStatic && tp.symbol.isStatic) tp
2887-
else tp.derivedSelect(this(tp.prefix))
2887+
else {
2888+
val saved = variance
2889+
variance = 0
2890+
val result = tp.derivedSelect(this(tp.prefix))
2891+
variance = saved
2892+
result
2893+
}
28882894

28892895
case _: ThisType
28902896
| _: BoundType

0 commit comments

Comments
 (0)