Skip to content

Commit 81da0f6

Browse files
committed
Fix #9782: hanlde F-bounds in isInstanceOf check
1 parent 0be70e7 commit 81da0f6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ object TypeTestsCasts {
8181
case _: MatchType =>
8282
tp // break cycles
8383
case tp: TypeRef if isBounds(tp.underlying) =>
84-
val lo = apply(tp.info.loBound)
85-
val hi = apply(tp.info.hiBound)
84+
def lo = apply(tp.info.loBound.subst(tp.symbol :: Nil, WildcardType :: Nil))
85+
def hi = apply(tp.info.hiBound.subst(tp.symbol :: Nil, WildcardType :: Nil))
86+
8687
range(lo, hi)
8788
case _ =>
8889
mapOver(tp)

0 commit comments

Comments
 (0)