Skip to content

Commit c0d7115

Browse files
committed
Remove extraneous method in generated code.
1 parent 1333b38 commit c0d7115

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/main/scala/scala/async/internal/AsyncTransform.scala

+2-7
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,10 @@ trait AsyncTransform {
3838

3939
val apply0DefDef: DefDef = {
4040
// We extend () => Unit so we can pass this class as the by-name argument to `Future.apply`.
41-
// See SI-1247 for the the optimization that avoids creatio
41+
// See SI-1247 for the the optimization that avoids creation.
4242
DefDef(NoMods, name.apply, Nil, Nil, TypeTree(definitions.UnitTpe), Apply(Ident(name.apply), literalNull :: Nil))
4343
}
44-
val extraValDef: ValDef = {
45-
// We extend () => Unit so we can pass this class as the by-name argument to `Future.apply`.
46-
// See SI-1247 for the the optimization that avoids creatio
47-
ValDef(NoMods, newTermName("extra"), TypeTree(definitions.UnitTpe), literalUnit)
48-
}
49-
List(emptyConstructor, stateVar, result, execContextValDef) ++ List(applyDefDefDummyBody, apply0DefDef, extraValDef)
44+
List(emptyConstructor, stateVar, result, execContextValDef) ++ List(applyDefDefDummyBody, apply0DefDef)
5045
}
5146

5247
val tryToUnit = appliedType(definitions.FunctionClass(1), futureSystemOps.tryType[Any], typeOf[Unit])

0 commit comments

Comments
 (0)