Skip to content

Commit

Permalink
Fix erroneous isInstanceOf test in compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Mar 19, 2022
1 parent effb9d1 commit c0057b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/TreeChecker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class TreeChecker extends Phase with SymTransformer {
}

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

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

0 comments on commit c0057b6

Please sign in to comment.