Skip to content

Commit 65a86ae

Browse files
authored
Merge pull request #15542 from tgodzik/guard-against-empty
Add a guard against empty ident
2 parents a1157db + 8348386 commit 65a86ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ object Scala3:
416416
unicodeEscape.replaceAllIn(symbol, m => String.valueOf(Integer.parseInt(m.group(1), 16).toChar).nn)
417417

418418
def isJavaIdent =
419-
isJavaIdentifierStart(symbol.head) && symbol.tail.forall(isJavaIdentifierPart)
419+
symbol.nonEmpty && isJavaIdentifierStart(symbol.head) && symbol.tail.forall(isJavaIdentifierPart)
420420
end StringOps
421421

422422
given InfoOps: AnyRef with

0 commit comments

Comments
 (0)