Skip to content

Commit c0057b6

Browse files
committed
Fix erroneous isInstanceOf test in compiler
1 parent effb9d1 commit c0057b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ class TreeChecker extends Phase with SymTransformer {
418418
}
419419

420420
override def typedSuper(tree: untpd.Super, pt: Type)(using Context): Tree =
421-
assert(tree.qual.tpe.isInstanceOf[ThisType], i"expect prefix of Super to be This, actual = ${tree.qual}")
421+
assert(tree.qual.typeOpt.isInstanceOf[ThisType], i"expect prefix of Super to be This, actual = ${tree.qual}")
422422
super.typedSuper(tree, pt)
423423

424424
override def typedTyped(tree: untpd.Typed, pt: Type)(using Context): Tree =

0 commit comments

Comments
 (0)