Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.1
    • Component/s: Macros
    • Labels:

      Description

      There are a lot of tickets about things which can't be reified so this could easily be a duplicate, but I don't see the right one, so:

      scala> reflect.runtime.universe.reify { trait Foo { val a: Int } }
      <console>:8: error: exception during macro expansion: 
      java.lang.Error: unexpected: bound type that doesn't have a tpe: Ident(newTypeName("Int"))
      	at scala.reflect.reify.codegen.GenTrees$class.reifyBoundType$1(GenTrees.scala:154)
      	at scala.reflect.reify.codegen.GenTrees$class.reifyBoundType(GenTrees.scala:203)
      	at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:56)
      	at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
      	at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:46)
      

      No complaints about an abstract def:

      
      res1: reflect.runtime.universe.Expr[Unit] = 
      Expr[Unit]({
        abstract trait Foo extends Object {
          def a: Int
        };
        ()
      })
      

        Activity

        Hide
        Eugene Burmako added a comment -

        This bug is being fixed

        Show
        Eugene Burmako added a comment - This bug is being fixed
        Show
        Eugene Burmako added a comment - Fixed in https://github.com/scala/scala/commit/548a54d708d8aaceea6abe0931aabaa70b2cd925

          People

          • Assignee:
            Eugene Burmako
            Reporter:
            Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development