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

q"${null}" crashes #7996

Closed
scabug opened this issue Nov 22, 2013 · 3 comments
Closed

q"${null}" crashes #7996

scabug opened this issue Nov 22, 2013 · 3 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Nov 22, 2013

scala> q"${null}"
<console>:30: error: exception during macro expansion:
java.util.NoSuchElementException: head of empty list
at scala.collection.immutable.Nil$.head(List.scala:337)
at scala.collection.immutable.Nil$.head(List.scala:334)
at scala.tools.reflect.quasiquotes.Holes$class.parseCardinality(Holes.scala:183)
at scala.tools.reflect.quasiquotes.Quasiquotes.parseCardinality(Quasiquotes.scala:6)
at scala.tools.reflect.quasiquotes.Holes$Hole$.apply(Holes.scala:158)
at scala.tools.reflect.quasiquotes.Placeholders$class.appendHole$1(Placeholders.scala:36)
at scala.tools.reflect.quasiquotes.Placeholders$$anonfun$code$1.apply(Placeholders.scala:48)
at scala.tools.reflect.quasiquotes.Placeholders$$anonfun$code$1.apply(Placeholders.scala:45)
at scala.reflect.internal.util.Collections$class.foreach2(Collections.scala:190)
at scala.reflect.internal.SymbolTable.foreach2(SymbolTable.scala:14)
at scala.tools.reflect.quasiquotes.Placeholders$class.code(Placeholders.scala:45)
at scala.tools.reflect.quasiquotes.Quasiquotes.code$lzycompute(Quasiquotes.scala:6)
at scala.tools.reflect.quasiquotes.Quasiquotes.code(Quasiquotes.scala:6)
at scala.tools.reflect.quasiquotes.Quasiquotes.expandQuasiquote(Quasiquotes.scala:47)
at scala.tools.reflect.FastTrack$$anonfun$1$$anonfun$apply$7$$anonfun$applyOrElse$7.apply(FastTrack.scala:51)
at scala.tools.reflect.FastTrack$$anonfun$1$$anonfun$apply$7$$anonfun$applyOrElse$7.apply(FastTrack.scala:51)
at scala.tools.reflect.FastTrack$FastTrackEntry.apply(FastTrack.scala:35)
at scala.tools.reflect.FastTrack$FastTrackEntry.apply(FastTrack.scala:30)
at scala.tools.nsc.typechecker.Macros$class.scala$tools$nsc$typechecker$Macros$$macroExpandWithRuntime(Macros.scala:752)

              q"${null}"
              ^
@scabug
Copy link
Author

scabug commented Nov 22, 2013

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

@scabug
Copy link
Author

scabug commented Nov 29, 2013

@densh said:
Fixed by forbidding of splicing of bottom types into quasiquotes.

@scabug
Copy link
Author

scabug commented Dec 13, 2013

@densh said:
Fixed in scala/scala#3255

@scabug scabug closed this as completed Dec 13, 2013
@scabug scabug added this to the 2.11.0-M8 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants