Closed
Description
Scala 2.13.7
From https://www.scala-lang.org/files/archive/spec/2.13/13-syntax-summary.html:
interpolatedString ::= alphaid ...
alphaid ::= upper idrest
| varid // lower idrest
upper ::= ... any character in Unicode categories Lu, Lt or Nl,
and any character in Unicode categories Lo and Lm that don't have
contributory property Other_Lowercase
lower ::= ‘a’ | … | ‘z’ | ‘_’ and any character in Unicode category Ll,
and any character in Unicode categories Lo or Lm that has contributory
property Other_Lowercase
object O2 {
//OK
a"${1}"
// false compiler error: ';' expected but string literal found
𝓅"${1}"
𐐀"${1}"
Dž"${1}"
ᛮ"${1}"
implicit class MyInterpolators(sc: StringContext) {
def a(subs: Any*): String = ???
def 𝓅(subs: Any*): String = ??? // category: Ll
def 𐐀(subs: Any*): String = ??? // category: Lu
def Dž(subs: Any*): String = ??? // category: Lt
def ᛮ(subs: Any*): String = ??? // category: Nl
}
}
JFR All identifiers are accepted by the Java compiler
class MyJava {
public void 𝓅() {}
public void 𐐀() {}
public void Dž() {}
public void ᛮ() {}
}
relates to:
#1406
scala/scala#9687