summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala
diff options
context:
space:
mode:
authorDen Shabalin <den.shabalin@gmail.com>2013-12-02 13:26:01 +0100
committerDen Shabalin <den.shabalin@gmail.com>2013-12-10 16:02:44 +0100
commit4be6ea147a7d8f300c1e6db2a216b50fe8cf5dc7 (patch)
tree904e5b1ca930a5745d1f0e4a4734b4f421cfd263 /src/reflect/scala/reflect/runtime/JavaUniverseForce.scala
parentf3c260bf89942ff58796ed7d242ad2e106331f83 (diff)
downloadscala-4be6ea147a7d8f300c1e6db2a216b50fe8cf5dc7.tar.gz
scala-4be6ea147a7d8f300c1e6db2a216b50fe8cf5dc7.tar.bz2
scala-4be6ea147a7d8f300c1e6db2a216b50fe8cf5dc7.zip
Provide a way for unapply macro to obtain a list of subpattens
This commit introduces internal attachment that allows unapply macros to be aware of their sub patterns and tweak their expansion depending on that info. At the moment this is not possible due to the way pattern macros are expanded: case MacroPat(inner1, inner2) => ... During type checking this will expand as MacroPat.unapply(<unapply-dummy>) Meaning that macro can’t see inner1 and inner2 in it’s macroApplication. To circumvent this we attach that info as an attachment to the dummy.
Diffstat (limited to 'src/reflect/scala/reflect/runtime/JavaUniverseForce.scala')
-rw-r--r--src/reflect/scala/reflect/runtime/JavaUniverseForce.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala b/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala
index 974706aa0b..e296a28779 100644
--- a/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala
+++ b/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala
@@ -57,6 +57,7 @@ trait JavaUniverseForce { self: runtime.JavaUniverse =>
this.CompoundTypeTreeOriginalAttachment
this.BackquotedIdentifierAttachment
this.ForAttachment
+ this.SubpatternsAttachment
this.noPrint
this.typeDebug
// inaccessible: this.maxFree