Skip to content

Commit

Permalink
The qual of This could be Ident
Browse files Browse the repository at this point in the history
We should check the type instead,
which is more semantic.
  • Loading branch information
liufengyun committed Jul 22, 2020
1 parent 78ecf5f commit 22cc628
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 @@ -414,7 +414,7 @@ class TreeChecker extends Phase with SymTransformer {
}

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

private def checkOwner(tree: untpd.Tree)(using Context): Unit = {
Expand Down

0 comments on commit 22cc628

Please sign in to comment.