From e1d9805c91dbe74317e2f4f22ad59056d64d12b3 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Mon, 14 Jan 2013 17:29:42 +0100 Subject: macro engine refactoring Macro impl bindings now store more information in signatures. Previously it was a flattened List[Int] corresponding to flattened paramss, now it's List[List[Int]] to preserve the lengths of parameter lists. Also now we distinguish between c.Expr parameters and others. Previously actual and reference macro signatures were represented as tuples of vparamss, rets, and sometimes tparams. Now they are all abstracted behind MacroImplSig. Finally this patch provides better error messages in cases of argsc <-> paramsc and argc <-> paramc mismatches. --- test/files/neg/t7157/Test_2.scala | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 test/files/neg/t7157/Test_2.scala (limited to 'test/files/neg/t7157/Test_2.scala') diff --git a/test/files/neg/t7157/Test_2.scala b/test/files/neg/t7157/Test_2.scala new file mode 100644 index 0000000000..45a6026399 --- /dev/null +++ b/test/files/neg/t7157/Test_2.scala @@ -0,0 +1,63 @@ +import Macros._ + +object Test extends App { + m1_0_0() + m1_0_0(1) + m1_0_0(1, 2) + m1_0_0(1, 2, 3) + + m1_1_1() + m1_1_1(1) + m1_1_1(1, 2) + m1_1_1(1, 2, 3) + + m1_2_2() + m1_2_2(1) + m1_2_2(1, 2) + m1_2_2(1, 2, 3) + + m1_0_inf() + m1_0_inf(1) + m1_0_inf(1, 2) + m1_0_inf(1, 2, 3) + + m1_1_inf() + m1_1_inf(1) + m1_1_inf(1, 2) + m1_1_inf(1, 2, 3) + + m1_2_inf() + m1_2_inf(1) + m1_2_inf(1, 2) + m1_2_inf(1, 2, 3) + + m2_0_0()() + m2_0_0()(1) + m2_0_0()(1, 2) + m2_0_0()(1, 2, 3) + + m2_1_1()() + m2_1_1()(1) + m2_1_1()(1, 2) + m2_1_1()(1, 2, 3) + + m2_2_2()() + m2_2_2()(1) + m2_2_2()(1, 2) + m2_2_2()(1, 2, 3) + + m2_0_inf()() + m2_0_inf()(1) + m2_0_inf()(1, 2) + m2_0_inf()(1, 2, 3) + + m2_1_inf()() + m2_1_inf()(1) + m2_1_inf()(1, 2) + m2_1_inf()(1, 2, 3) + + m2_2_inf()() + m2_2_inf()(1) + m2_2_inf()(1, 2) + m2_2_inf()(1, 2, 3) +} \ No newline at end of file -- cgit v1.2.3