Skip to content

supplementary characters from Unicode_So category are not parsed in operator identifier #12482

Closed
scala/scala
#9805
@unkarjedy

Description

@unkarjedy

Scala 2.13.7

https://www.scala-lang.org/files/archive/spec/2.13/13-syntax-summary.html

opchar           ::=  ‘!’ | ‘#’ | ‘%’ | ‘&’ | ‘*’ | ‘+’ | ‘-’ | ‘/’ | ‘:’ |
                      ‘<’ | ‘=’ | ‘>’ | ‘?’ | ‘@’ | ‘\’ | ‘^’ | ‘|’ | ‘~’
                      and any character in Unicode categories Sm or So

Supplementary unicode characters \u1F300..\u1F5FF are also included by Unicode So category.
See java.lang.Character.UnicodeBlock#MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS
But they are not parsed in 2.13.7

class Suppl {
  def  = 42
  def 𐐀 = 42
  def 🌂 = 42
  def 🌀 = 42
}
error: illegal character '\ud83c\udf02'
error: illegal character '\ud83c\udf00'

Whether spec or implementation should be patched.

relates to:
scala/scala#9687
#1406

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions