File: macro-invalidshape.check

package info (click to toggle)
scala 2.11.12-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 62,924 kB
  • sloc: javascript: 28,808; java: 13,415; xml: 3,135; sh: 1,620; python: 756; makefile: 38; awk: 36; ansic: 6
file content (21 lines) | stat: -rw-r--r-- 1,133 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Macros_Test_2.scala:2: error: macro implementation reference has wrong shape. required:
macro [<static object>].<method name>[[<type args>]] or
macro [<macro bundle>].<method name>[[<type args>]]
  def foo1(x: Any) = macro 2
                           ^
Macros_Test_2.scala:3: error: macro implementation reference has wrong shape. required:
macro [<static object>].<method name>[[<type args>]] or
macro [<macro bundle>].<method name>[[<type args>]]
  def foo2(x: Any) = macro Impls.foo(null)(null)
                                 ^
Macros_Test_2.scala:4: error: missing argument list for method foo in object Impls
Unapplied methods are only converted to functions when a function type is expected.
You can make this conversion explicit by writing `foo _` or `foo(_)(_)` instead of `foo`.
  def foo3(x: Any) = macro {2; Impls.foo}
                                     ^
Macros_Test_2.scala:7: error: macro implementation reference has wrong shape. required:
macro [<static object>].<method name>[[<type args>]] or
macro [<macro bundle>].<method name>[[<type args>]]
    def foo = macro impl
                    ^
four errors found