Skip to content

Commit 2361d2c

Browse files
committed
Address review comments and use alternative fix
1 parent 104f817 commit 2361d2c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,11 +1586,13 @@ 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 _: untpd.Select =>
1592+
// Could be produced by parsing incomplete argument lists.
1593+
assert(false, "Raw Select node found in constructor position")
1594+
false
1595+
case _ => true
15941596
}
15951597
var result = if (isTreeType(tree)) typedType(tree)(superCtx) else typedExpr(tree)(superCtx)
15961598
val psym = result.tpe.dealias.typeSymbol

0 commit comments

Comments
 (0)