Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot reify abstract vals #6023

Closed
scabug opened this issue Jul 3, 2012 · 3 comments
Closed

cannot reify abstract vals #6023

scabug opened this issue Jul 3, 2012 · 3 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Jul 3, 2012

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
  };
  ()
})
@scabug
Copy link
Author

@scabug scabug commented Jul 3, 2012

@scabug
Copy link
Author

@scabug scabug commented Nov 9, 2012

@xeno-by said:
This bug is being fixed

@scabug
Copy link
Author

@scabug scabug commented Nov 23, 2012

@xeno-by said:
Fixed in scala/scala@548a54d

@scabug scabug closed this Nov 23, 2012
@scabug scabug added the macros label Apr 7, 2017
@scabug scabug added this to the 2.10.1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants