Skip to content

Commit 2732c6b

Browse files
committed
Address review comments and use alternative fix
1 parent 54fab4d commit 2732c6b

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
@@ -1593,11 +1593,9 @@ class Typer extends Namer
15931593
val seenParents = mutable.Set[Symbol]()
15941594

15951595
def typedParent(tree: untpd.Tree): Tree = {
1596-
@tailrec
15971596
def isTreeType(t: untpd.Tree): Boolean = t match {
1598-
case _: untpd.Function => true
1599-
case untpd.Parens(t1) => isTreeType(t1)
1600-
case _ => tree.isType
1597+
case _: untpd.Apply => false
1598+
case _ => true
16011599
}
16021600
var result = if (isTreeType(tree)) typedType(tree)(superCtx) else typedExpr(tree)(superCtx)
16031601
val psym = result.tpe.dealias.typeSymbol

0 commit comments

Comments
 (0)