sourcecode.Text crashes on (_+1)
lihaoyi opened this issue · 2 comments
lihaoyi commented
haoyi-haoyi@ sourcecode.Text(Seq(1).map(_+1))
Main.scala:259: 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.internal.Trees$$anonfun$itraverse$1.apply$mcV$sp(Trees.scala:1329)
at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1329)
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.internal.Trees$class.traverseComponents$1(Trees.scala:1283)
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)
sourcecode.Text(Seq(1).map(_+1))
^
Compilation Failed
haoyi-haoyi@