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 existentially typed code #6386

Closed
scabug opened this issue Sep 17, 2012 · 3 comments
Closed

cannot reify existentially typed code #6386

scabug opened this issue Sep 17, 2012 · 3 comments
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Sep 17, 2012

scala> reify(manifest[Some[_]])
error: exception during macro expansion:
java.lang.Error: unexpected: bound type that doesn't have a tpe: Ident(newTypeNa
me("Some"))
        at scala.reflect.reify.codegen.GenTrees$class.reifyBoundType$1(GenTrees.
scala:154)
        at scala.reflect.reify.codegen.GenTrees$class.reifyBoundType(GenTrees.sc
ala:201)
        at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:5
6)
        at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:4
6)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:309)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:19)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:14)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:6
2)
        at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:4
6)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:309)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:19)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:14)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:6
2)
        at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:4
6)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyList$1.apply(GenUt
ils.scala:11)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyList$1.apply(GenUt
ils.scala:11)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:309)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at scala.reflect.reify.codegen.GenUtils$class.reifyList(GenUtils.scala:1
1)
        at scala.reflect.reify.Reifier.reifyList(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:5
2)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:309)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:19)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:14)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:6
2)
        at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:4
6)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:309)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:19)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:14)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:6
2)
        at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:4
6)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.Phases$$anonfun$mkReificationPipeline$1.apply(Pha
ses.scala:40)
        at scala.reflect.reify.Phases$$anonfun$mkReificationPipeline$1.apply(Pha
ses.scala:17)
        at scala.reflect.reify.Reifier.liftedTree1$1(Reifier.scala:67)
        at scala.reflect.reify.Reifier.reification$lzycompute(Reifier.scala:54)
        at scala.reflect.reify.Reifier.reification(Reifier.scala:53)
        at scala.reflect.reify.package$.reifyTree(package.scala:43)
        at scala.reflect.macros.runtime.Reifiers$class.reifyTree(Reifiers.scala:
18)
        at scala.reflect.macros.runtime.Context.reifyTree(Context.scala:6)
        at scala.reflect.reify.Taggers$$anonfun$1.apply(Taggers.scala:72)
        at scala.reflect.reify.Taggers$$anonfun$1.apply(Taggers.scala:72)
        at scala.reflect.reify.Taggers.translatingReificationErrors(Taggers.scal
a:78)
        at scala.reflect.reify.Taggers.materializeExpr(Taggers.scala:72)
        at scala.tools.reflect.FastTrack$$anonfun$fastTrack$4.applyOrElse(FastTr
ack.scala:36)
        at scala.tools.reflect.FastTrack$$anonfun$fastTrack$4.applyOrElse(FastTr
ack.scala:36)
        at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.s
cala:33)
        at scala.tools.reflect.FastTrack$FastTrackEntry.run(FastTrack.scala:25)


scala> reify(manifest[Some[_]])
error: exception during macro expansion:
java.lang.Error: unexpected: bound type that doesn't have a tpe: Ident(newTypeNa
me("Some"))
        at scala.reflect.reify.codegen.GenTrees$class.reifyBoundType$1(GenTrees.
scala:154)
        at scala.reflect.reify.codegen.GenTrees$class.reifyBoundType(GenTrees.sc
ala:201)
        at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:5
6)
        at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:4
6)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:309)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:19)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:14)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:6
2)
        at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:4
6)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:309)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:19)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:14)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:6
2)
        at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:4
6)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyList$1.apply(GenUt
ils.scala:11)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyList$1.apply(GenUt
ils.scala:11)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:309)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at scala.reflect.reify.codegen.GenUtils$class.reifyList(GenUtils.scala:1
1)
        at scala.reflect.reify.Reifier.reifyList(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:5
2)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:309)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:19)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:14)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:6
2)
        at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:4
6)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.reflect.reify.codegen.GenUtils$$anonfun$reifyProduct$2.apply(Ge
nUtils.scala:19)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:309)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:19)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenUtils$class.reifyProduct(GenUtils.scal
a:14)
        at scala.reflect.reify.Reifier.reifyProduct(Reifier.scala:14)
        at scala.reflect.reify.codegen.GenTrees$class.reifyTree(GenTrees.scala:6
2)
        at scala.reflect.reify.Reifier.reifyTree(Reifier.scala:14)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:4
6)
        at scala.reflect.reify.phases.Reify$$anonfun$reify$1.apply(Reify.scala:3
9)
        at scala.reflect.reify.phases.Reify$reifyStack$.push(Reify.scala:27)
        at scala.reflect.reify.phases.Reify$class.reify(Reify.scala:39)
        at scala.reflect.reify.Reifier.reify(Reifier.scala:14)
        at scala.reflect.reify.Phases$$anonfun$mkReificationPipeline$1.apply(Pha
ses.scala:40)
        at scala.reflect.reify.Phases$$anonfun$mkReificationPipeline$1.apply(Pha
ses.scala:17)
        at scala.reflect.reify.Reifier.liftedTree1$1(Reifier.scala:67)
        at scala.reflect.reify.Reifier.reification$lzycompute(Reifier.scala:54)
        at scala.reflect.reify.Reifier.reification(Reifier.scala:53)
        at scala.reflect.reify.package$.reifyTree(package.scala:43)
        at scala.reflect.macros.runtime.Reifiers$class.reifyTree(Reifiers.scala:
18)
        at scala.reflect.macros.runtime.Context.reifyTree(Context.scala:6)
        at scala.reflect.reify.Taggers$$anonfun$1.apply(Taggers.scala:72)
        at scala.reflect.reify.Taggers$$anonfun$1.apply(Taggers.scala:72)
        at scala.reflect.reify.Taggers.translatingReificationErrors(Taggers.scal
a:78)
        at scala.reflect.reify.Taggers.materializeExpr(Taggers.scala:72)
        at scala.tools.reflect.FastTrack$$anonfun$fastTrack$4.applyOrElse(FastTr
ack.scala:36)
        at scala.tools.reflect.FastTrack$$anonfun$fastTrack$4.applyOrElse(FastTr
ack.scala:36)
        at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.s
cala:33)
        at scala.tools.reflect.FastTrack$FastTrackEntry.run(FastTrack.scala:25)
@scabug
Copy link
Author

@scabug scabug commented Sep 17, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6386?orig=1
Reporter: @xeno-by
Affected Versions: 2.10.0

@scabug
Copy link
Author

@scabug scabug commented Nov 1, 2012

@Atry said (edited by @xeno-by on Feb 15, 2013 1:06:34 PM UTC):
Moved the comment to the description of the bug.

@scabug
Copy link
Author

@scabug scabug commented Apr 9, 2013

@adriaanm said:
scala/scala#2365

Fixed by https://github.com/u-abramchuk, who's not in JIRA

@scabug scabug closed this Apr 9, 2013
@scabug scabug added this to the 2.10.2-RC1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant