diff options
Diffstat (limited to 'test/files/neg/macro-invalidshape.check')
-rw-r--r-- | test/files/neg/macro-invalidshape.check | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/neg/macro-invalidshape.check b/test/files/neg/macro-invalidshape.check new file mode 100644 index 0000000000..cefc95b763 --- /dev/null +++ b/test/files/neg/macro-invalidshape.check @@ -0,0 +1,17 @@ +Macros_Test_2.scala:2: error: macro body has wrong shape: + required: macro [<implementation object>].<method name>[[<type args>]] + def foo1(x: Any) = macro 2 + ^ +Macros_Test_2.scala:3: error: macro body has wrong shape: + required: macro [<implementation object>].<method name>[[<type args>]] + def foo2(x: Any) = macro Impls.foo(null)(null) + ^ +Macros_Test_2.scala:4: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses + def foo3(x: Any) = macro {2; Impls.foo} + ^ +Macros_Test_2.scala:4: error: missing arguments for method foo in object Impls; +follow this method with `_' if you want to treat it as a partially applied function + def foo3(x: Any) = macro {2; Impls.foo} + ^ +one warning found +three errors found |