From c0d711570b76fb17f8f58a80f8529dcb9cbfdb2c Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Fri, 12 Dec 2014 07:42:36 +1000 Subject: Remove extraneous method in generated code. --- src/main/scala/scala/async/internal/AsyncTransform.scala | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/main') diff --git a/src/main/scala/scala/async/internal/AsyncTransform.scala b/src/main/scala/scala/async/internal/AsyncTransform.scala index c7a0c65..47a2704 100644 --- a/src/main/scala/scala/async/internal/AsyncTransform.scala +++ b/src/main/scala/scala/async/internal/AsyncTransform.scala @@ -38,15 +38,10 @@ trait AsyncTransform { val apply0DefDef: DefDef = { // We extend () => Unit so we can pass this class as the by-name argument to `Future.apply`. - // See SI-1247 for the the optimization that avoids creatio + // See SI-1247 for the the optimization that avoids creation. DefDef(NoMods, name.apply, Nil, Nil, TypeTree(definitions.UnitTpe), Apply(Ident(name.apply), literalNull :: Nil)) } - val extraValDef: ValDef = { - // We extend () => Unit so we can pass this class as the by-name argument to `Future.apply`. - // See SI-1247 for the the optimization that avoids creatio - ValDef(NoMods, newTermName("extra"), TypeTree(definitions.UnitTpe), literalUnit) - } - List(emptyConstructor, stateVar, result, execContextValDef) ++ List(applyDefDefDummyBody, apply0DefDef, extraValDef) + List(emptyConstructor, stateVar, result, execContextValDef) ++ List(applyDefDefDummyBody, apply0DefDef) } val tryToUnit = appliedType(definitions.FunctionClass(1), futureSystemOps.tryType[Any], typeOf[Unit]) -- cgit v1.2.3