Skip to content

Commit 09e87b5

Browse files
committed
Address review comments and use alternative fix
1 parent 104f817 commit 09e87b5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,11 +1586,9 @@ class Typer extends Namer
15861586
val seenParents = mutable.Set[Symbol]()
15871587

15881588
def typedParent(tree: untpd.Tree): Tree = {
1589-
@tailrec
15901589
def isTreeType(t: untpd.Tree): Boolean = t match {
1591-
case _: untpd.Function => true
1592-
case untpd.Parens(t1) => isTreeType(t1)
1593-
case _ => tree.isType
1590+
case _: untpd.Apply => false
1591+
case _ => true
15941592
}
15951593
var result = if (isTreeType(tree)) typedType(tree)(superCtx) else typedExpr(tree)(superCtx)
15961594
val psym = result.tpe.dealias.typeSymbol

0 commit comments

Comments
 (0)