Skip to content

Commit 6ba8110

Browse files
committed
Do not match null in StringUnliftable
1 parent 693b818 commit 6ba8110

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src-bootstrapped/scala/quoted/Unliftable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ object Unliftable {
8383
def fromExpr(expr: Expr[T]) =
8484
import quotes.reflect._
8585
def rec(tree: Term): Option[T] = tree match {
86-
case Literal(c) => Some(c.value.asInstanceOf[T])
86+
case Literal(c) if c.value != null => Some(c.value.asInstanceOf[T])
8787
case Block(Nil, e) => rec(e)
8888
case Typed(e, _) => rec(e)
8989
case Inlined(_, Nil, e) => rec(e)

0 commit comments

Comments
 (0)