Skip to content

Commit b7d9b81

Browse files
committed
Remove code that handled path dependent types on unused parameters
1 parent 1523f3d commit b7d9b81

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@ class UnusedRefs extends MiniPhase {
4444
tree.tpe.widen match {
4545
case _: MethodType => tree // Do the transformation higher in the tree if needed
4646
case _ =>
47-
val result = defaultValue(tree.tpe) match {
48-
case t @ TypeApply(fun, args) => cpy.TypeApply(t)(fun = fun, args = args.map(transformAllDeep)) // asInstanceOf inserted by defaultValue
49-
case t => t
50-
}
5147
tree match {
52-
case _: RefTree => result
53-
case Apply(_ , args) => seq(args, result)
48+
case _: RefTree => defaultValue(tree.tpe)
49+
case Apply(_ , args) => seq(args, defaultValue(tree.tpe))
5450
}
5551
}
5652
}

0 commit comments

Comments
 (0)