Details

      Description

      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}"
                    ^
      

        Activity

        Hide
        Denys Shabalin added a comment -

        Fixed by forbidding of splicing of bottom types into quasiquotes.

        Show
        Denys Shabalin added a comment - Fixed by forbidding of splicing of bottom types into quasiquotes.
        Hide
        Denys Shabalin added a comment -
        Show
        Denys Shabalin added a comment - Fixed in https://github.com/scala/scala/pull/3255

          People

          • Assignee:
            Denys Shabalin
            Reporter:
            Eugene Burmako
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development