diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-12-12 07:42:36 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-12-15 12:55:30 +1000 |
commit | c0d711570b76fb17f8f58a80f8529dcb9cbfdb2c (patch) | |
tree | 8f0138024b2e9b05a765c5bc106690e154cc1d4b | |
parent | 1333b3837d405c31baaa44d1db89aab0f7d09349 (diff) | |
download | scala-async-c0d711570b76fb17f8f58a80f8529dcb9cbfdb2c.tar.gz scala-async-c0d711570b76fb17f8f58a80f8529dcb9cbfdb2c.tar.bz2 scala-async-c0d711570b76fb17f8f58a80f8529dcb9cbfdb2c.zip |
Remove extraneous method in generated code.
-rw-r--r-- | src/main/scala/scala/async/internal/AsyncTransform.scala | 9 |
1 files changed, 2 insertions, 7 deletions
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]) |