Skip to content

Commit 3e1a061

Browse files
committed
Drop redundant code in erasure
1 parent 7c83701 commit 3e1a061

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,14 +749,13 @@ object Erasure {
749749
val origFunType = origFun.tpe.widen(using preErasureCtx)
750750
val ownArgs = if origFunType.isErasedMethod then Nil else args
751751
val fun1 = typedExpr(fun, AnyFunctionProto)
752-
val fun1core = stripBlock(fun1)
753752
fun1.tpe.widen match
754753
case mt: MethodType =>
755754
val (xmt, // A method type like `mt` but with bunched arguments expanded to individual ones
756755
bunchArgs, // whether arguments are bunched
757756
outers) = // the outer reference parameter(s)
758-
if fun1core.isInstanceOf[Apply] then
759-
(mt, fun1core.removeAttachment(BunchedArgs).isDefined, Nil)
757+
if fun1.isInstanceOf[Apply] then
758+
(mt, fun1.removeAttachment(BunchedArgs).isDefined, Nil)
760759
else
761760
val xmt = expandedMethodType(mt, origFun)
762761
(xmt, xmt ne mt, outer.args(origFun))

0 commit comments

Comments
 (0)