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

Compilation failure #13

Closed
stanch opened this issue Apr 3, 2016 · 2 comments
Closed

Compilation failure #13

stanch opened this issue Apr 3, 2016 · 2 comments

Comments

@stanch
Copy link

stanch commented Apr 3, 2016

@ plot(Zipper(descendancy(2).sample.get))
Main.scala:144: exception during macro expansion: 
java.lang.UnsupportedOperationException: Position.point on NoPosition
    at scala.reflect.internal.util.Position.fail(Position.scala:17)
    at scala.reflect.internal.util.UndefinedPosition.point(Position.scala:95)
    at scala.reflect.internal.util.UndefinedPosition.point(Position.scala:90)
    at scala.reflect.internal.util.DeprecatedPosition$class.startOrPoint(Position.scala:247)
    at scala.reflect.internal.util.Position.startOrPoint(Position.scala:12)
    at sourcecode.Impls$$anonfun$1.applyOrElse(SourceContext.scala:118)
    at sourcecode.Impls$$anonfun$1.applyOrElse(SourceContext.scala:118)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1657)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1654)
    at scala.reflect.internal.Trees$$anonfun$traverseMemberDef$1$1.apply$mcV$sp(Trees.scala:1209)
    at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
    at scala.reflect.internal.Trees$class.traverseMemberDef$1(Trees.scala:1203)
    at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1328)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1658)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1654)
    at scala.reflect.api.Trees$Traverser.traverseTrees(Trees.scala:2484)
    at scala.reflect.api.Trees$Traverser.traverseParams(Trees.scala:2492)
    at scala.reflect.api.Trees$Traverser.traverseParamss(Trees.scala:2493)
    at scala.reflect.internal.Trees$$anonfun$traverseMemberDef$1$1.apply$mcV$sp(Trees.scala:1213)
    at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
    at scala.reflect.internal.Trees$class.traverseMemberDef$1(Trees.scala:1203)
    at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1328)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1658)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1654)
    at scala.reflect.api.Trees$Traverser$$anonfun$traverseStats$1$$anonfun$apply$1.apply$mcV$sp(Trees.scala:2498)
    at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
    at scala.reflect.api.Trees$Traverser.traverseStats(Trees.scala:2497)
    at scala.reflect.internal.Trees$class.traverseComponents$1(Trees.scala:1232)
    at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1330)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1658)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1654)
    at scala.reflect.internal.Trees$$anonfun$traverseMemberDef$1$1.apply$mcV$sp(Trees.scala:1207)
    at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
    at scala.reflect.internal.Trees$class.traverseMemberDef$1(Trees.scala:1203)
    at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1328)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1658)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1654)
    at scala.reflect.api.Trees$Traverser.traverseTrees(Trees.scala:2484)
    at scala.reflect.internal.Trees$class.traverseComponents$1(Trees.scala:1234)
    at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1330)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1658)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1654)
    at scala.reflect.api.Trees$Traverser.traverseTrees(Trees.scala:2484)
    at scala.reflect.internal.Trees$class.traverseComponents$1(Trees.scala:1284)
    at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1330)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1658)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1654)
    at scala.reflect.api.Trees$Traverser.traverseTrees(Trees.scala:2484)
    at scala.reflect.internal.Trees$class.traverseComponents$1(Trees.scala:1284)
    at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1330)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
    at scala.reflect.internal.Trees$CollectTreeTraverser.traverse(Trees.scala:1658)
    at scala.reflect.internal.Trees$TreeContextApiImpl.collect(Trees.scala:118)
    at sourcecode.Impls$.text(SourceContext.scala:118)

plot(Zipper(descendancy(2).sample.get))
           ^
Compilation Failed

I will publish that code soon, so it will be possible to try it.

@stanch
Copy link
Author

stanch commented Apr 10, 2016

This is the best reproducer I have so far:

git clone https://github.com/stanch/unzimm
cd unzimm
sbt amm
@ def f(a: sourcecode.Text[Zipper[Tree]]) = a.source
defined function f
@ f(Zipper(simpleTree))
Main.scala:330: exception during macro expansion: 
java.lang.UnsupportedOperationException: Position.point on NoPosition
<BAM>

@lihaoyi
Copy link
Member

lihaoyi commented Aug 3, 2016

Seems to be fixed by ef7642f

@lihaoyi lihaoyi closed this as completed Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants