diff options
author | Den Shabalin <den.shabalin@gmail.com> | 2013-12-02 13:26:01 +0100 |
---|---|---|
committer | Den Shabalin <den.shabalin@gmail.com> | 2013-12-10 16:02:44 +0100 |
commit | 4be6ea147a7d8f300c1e6db2a216b50fe8cf5dc7 (patch) | |
tree | 904e5b1ca930a5745d1f0e4a4734b4f421cfd263 /test/files | |
parent | f3c260bf89942ff58796ed7d242ad2e106331f83 (diff) | |
download | scala-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 'test/files')
0 files changed, 0 insertions, 0 deletions