Skip to content

Commit 49e03c6

Browse files
committed
CrossCastAnd: Fix issue with Phases.
Right part of and type should not be widened, as dotty could have used non-widened type to drive type inference.
1 parent ffb6d24 commit 49e03c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/transform/CrossCastAnd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CrossCastAnd extends MiniPhaseTransform { thisTransform =>
3939

4040
val tp = findType(t)
4141
if (l eq tp) tree
42-
else tree.qualifier.asInstance(AndType(tp, t)).select(tree.symbol)
42+
else tree.qualifier.asInstance(AndType(tp, tree.qualifier.tpe)).select(tree.symbol)
4343
case _ => tree
4444
}
4545
}

0 commit comments

Comments
 (0)