Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-5692

call to nullary, polymorphic macro without explicit type argument lead to NoSuchMethodError

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0-M7, Scala 2.10.0
    • Fix Version/s: Scala 2.11.0-M2
    • Component/s: Macros
    • Labels:

      Description

      ~/code/scala ./build/quick/bin/scala
      Welcome to Scala version 2.10.0-20120422-061223-8c95273b70 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_29).
       
      scala> def impl[A](c: reflect.makro.Context) = c.reify(())
      impl: [A](c: scala.reflect.makro.Context)c.mirror.Expr[Unit]
       
      scala> def decl[A] = macro impl[A]
      decl: [A]=> Unit
       
      scala> decl[Any]
       
      scala> decl
      java.lang.NoSuchMethodError: .decl()V
      	at .<init>(<console>:12)
      	at .<clinit>(<console>)
      	at .<init>(<console>:7)
      	at .<clinit>(<console>)
      	at $print(<console>)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:776)
      	at scala.tools.nsc.interpreter.IMain$Request$$anonfun$16.apply(IMain.scala:1040)
      	at scala.tools.nsc.interpreter.Line.scala$tools$nsc$interpreter$Line$$runAndSetState(Line.scala:41)
      	at scala.tools.nsc.interpreter.Line$$anonfun$2.apply$mcV$sp(Line.scala:47)
      	at scala.tools.nsc.io.package$$anon$2.run(package.scala:22)
      	at java.lang.Thread.run(Thread.java:680)
      
      

        Attachments

          Activity

            People

            • Assignee:
              burmako Eugene Burmako
              Reporter:
              retronym Jason Zaugg
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: