summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/TreeGen.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-10-02 16:34:59 +0200
committerEugene Burmako <xeno.by@gmail.com>2013-10-02 22:45:58 +0200
commitd627672ec4a10861a659bfaacfaf86aa4b5b4e6e (patch)
treefd8e9af80295bac892e9e684ef4945d9761a3352 /src/reflect/scala/reflect/internal/TreeGen.scala
parent8aae23ed47c4e38a465ff3373392484ca82473d1 (diff)
downloadscala-d627672ec4a10861a659bfaacfaf86aa4b5b4e6e.tar.gz
scala-d627672ec4a10861a659bfaacfaf86aa4b5b4e6e.tar.bz2
scala-d627672ec4a10861a659bfaacfaf86aa4b5b4e6e.zip
clearly establishes what macro bundles are
Previously it was enough to just extend scala.reflect.macros.Macro, which created some loopholes, but now scalac enforces that bundles: 1) Are static (not necessarily top-level, but just static) 2) Are traits (objects shouldn't be bundles anyway, and classes bring complications with their ctors which require special treatment in generated classes, so why support them if they don't bring anything new to the table?) 3) Are monomorphic (again, this brings unnecessary complications wrt auxiliary code generation, so I don't see merit in supporting polymorphic bundles, whatever that a polymorphic bundle could mean) 4) Don't provide concrete implementation for Macro.c (if they do then what is the point?)
Diffstat (limited to 'src/reflect/scala/reflect/internal/TreeGen.scala')
-rw-r--r--src/reflect/scala/reflect/internal/TreeGen.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/TreeGen.scala b/src/reflect/scala/reflect/internal/TreeGen.scala
index e44461f964..720d8bfe4a 100644
--- a/src/reflect/scala/reflect/internal/TreeGen.scala
+++ b/src/reflect/scala/reflect/internal/TreeGen.scala
@@ -209,7 +209,8 @@ abstract class TreeGen extends macros.TreeBuilder {
/** Builds a type application node if args.nonEmpty, returns fun otherwise. */
def mkTypeApply(fun: Tree, targs: List[Tree]): Tree =
if (targs.isEmpty) fun else TypeApply(fun, targs)
-
+ def mkAppliedTypeTree(fun: Tree, targs: List[Tree]): Tree =
+ if (targs.isEmpty) fun else AppliedTypeTree(fun, targs)
def mkAttributedTypeApply(target: Tree, method: Symbol, targs: List[Type]): Tree =
mkTypeApply(mkAttributedSelect(target, method), targs map TypeTree)