Skip to content

Commit 84313fb

Browse files
committed
Fix #3875: Avoid NPE
1 parent 577781c commit 84313fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/Scanners.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ object Scanners {
950950
setStrVal()
951951
} else {
952952
token = op
953-
strVal = name.toString
953+
strVal = if (name != null) name.toString else null
954954
litBuf.clear()
955955
}
956956
}

0 commit comments

Comments
 (0)