From d627672ec4a10861a659bfaacfaf86aa4b5b4e6e Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Wed, 2 Oct 2013 16:34:59 +0200 Subject: 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?) --- test/files/neg/macro-bundle-nonmacro.check | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test/files/neg/macro-bundle-nonmacro.check (limited to 'test/files/neg/macro-bundle-nonmacro.check') diff --git a/test/files/neg/macro-bundle-nonmacro.check b/test/files/neg/macro-bundle-nonmacro.check new file mode 100644 index 0000000000..5a265b5724 --- /dev/null +++ b/test/files/neg/macro-bundle-nonmacro.check @@ -0,0 +1,4 @@ +macro-bundle-nonmacro.scala:8: error: not found: value Bundle + def foo = Bundle.impl + ^ +one error found -- cgit v1.2.3