diff options
Diffstat (limited to 'test/files/neg/macro-override-macro-overrides-abstract-method-a')
-rw-r--r-- | test/files/neg/macro-override-macro-overrides-abstract-method-a/Impls_Macros_1.scala | 13 | ||||
-rw-r--r-- | test/files/neg/macro-override-macro-overrides-abstract-method-a/Test_2.scala | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-a/Impls_Macros_1.scala b/test/files/neg/macro-override-macro-overrides-abstract-method-a/Impls_Macros_1.scala new file mode 100644 index 0000000000..cb0b152852 --- /dev/null +++ b/test/files/neg/macro-override-macro-overrides-abstract-method-a/Impls_Macros_1.scala @@ -0,0 +1,13 @@ +import scala.reflect.makro.{Context => Ctx} + +object Impls { + def impl(c: Ctx)(x: c.Expr[Int]) = x +} + +trait Foo { + def foo(x: Int): Int +} + +object Macros extends Foo { + def foo(x: Int) = macro Impls.impl +} diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-a/Test_2.scala b/test/files/neg/macro-override-macro-overrides-abstract-method-a/Test_2.scala new file mode 100644 index 0000000000..7e3357ec28 --- /dev/null +++ b/test/files/neg/macro-override-macro-overrides-abstract-method-a/Test_2.scala @@ -0,0 +1,4 @@ +object Test extends App { + val designator: Macros.type = Macros + designator.foo(42) +}
\ No newline at end of file |