Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
unkarjedy opened this issue Nov 4, 2021 · 1 comment · Fixed by scala/scala#9805
Assignees
Milestone

Comments

@unkarjedy
Copy link

unkarjedy commented Nov 4, 2021

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

@SethTisue SethTisue added this to the 2.13.8 milestone Nov 4, 2021
@som-snytt
Copy link

Thanks for the report! I will follow up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants