Skip to content

Commit a768e39

Browse files
committed
TreeChecker#adapt: do not check PolyProto
This should be safe like skipping FunProto since we'll check the type application result anyway. This is needed to get -Ycheck:frontend to work when named type parameters are used like in t1513a.scala
1 parent 3be4e81 commit a768e39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/transform/TreeChecker.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ class TreeChecker extends Phase with SymTransformer {
443443
if (ctx.mode.isExpr &&
444444
!tree.isEmpty &&
445445
!isPrimaryConstructorReturn &&
446-
!pt.isInstanceOf[FunProto])
446+
!pt.isInstanceOf[FunProto] &&
447+
!pt.isInstanceOf[PolyProto])
447448
assert(tree.tpe <:< pt, {
448449
val mismatch = err.typeMismatchMsg(tree.tpe, pt)
449450
i"""|${mismatch.msg}

0 commit comments

Comments
 (0)