summaryrefslogtreecommitdiff
path: root/test/files/run/macro-expand-implicit-argument.check
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-08-25 11:04:37 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-08-25 11:04:37 +0200
commit5bdfddefd7ff13476185b67d869a92c6c9f94506 (patch)
treebffc3880864828ce34726e8d994f5a64e4c6c09a /test/files/run/macro-expand-implicit-argument.check
parent07a0b702ab00223f6f849868f0982cdb7994af66 (diff)
downloadscala-5bdfddefd7ff13476185b67d869a92c6c9f94506.tar.gz
scala-5bdfddefd7ff13476185b67d869a92c6c9f94506.tar.bz2
scala-5bdfddefd7ff13476185b67d869a92c6c9f94506.zip
SI-6281 macroArgs for defs with implicit args
macroArgs now correctly calculates the argss in case when a macro def has implicit parameters. Macro impls can never have implicit parameters other than type tag evidences, so tags will always come in a separate parameter list w.r.t other parameters of macro impls (which are in 1-to-1 correspondence with the parameters of macro defs). Example 1: def w/o implicits: (params1)...(paramsN) impl w/o tags: (params1')...(paramsN') Example 2: def w/o implicits: (params1)...(paramsN) impl w tags: (params1')...(paramsN')(implicit tags) Example 3: def w implicits: (params1)...(paramsN)(implicit paramsN+1) impl w/o tags: (params1')...(paramsN')(paramsN+1') Note: paramsN+1' is not an implicit parameter list because impls cannot have implicit parameters other than tags Example 4: def w implicits: (params1)...(paramsN)(implicit paramsN+1) impl w tags: (params1')...(paramsN')(paramsN+1')(implicit tags) Therefore we don't need to merge the argss.last (that correspond to implicit parameters of macro defs) with tags, as it was incorrectly coded before. We just need to append tags to argss.
Diffstat (limited to 'test/files/run/macro-expand-implicit-argument.check')
-rw-r--r--test/files/run/macro-expand-implicit-argument.check1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/run/macro-expand-implicit-argument.check b/test/files/run/macro-expand-implicit-argument.check
new file mode 100644
index 0000000000..fb42345748
--- /dev/null
+++ b/test/files/run/macro-expand-implicit-argument.check
@@ -0,0 +1 @@
+List(1, 2, 3)