Aladdin - Scala Bugtracking
[#918] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Iulian won't fix 2007-01-28 23:12:06.0
subject [contrib #306] It is possible to have method names with illegal unicode identifiers
code
This won't come out. For example, if is possible to have

def method(x: int): unit = { ... }

Where method starts with or contains an illegal Java identifier (as found using java.lang.Character.isJavaIdentifierStart or java.lang.Character.isJavaIdentifierPart). In particular, the top bit set latin 1 indentifiers for multiply and divide (0x00D7 and 0x00F7 in Unicode). This compiles correctly, but can not be loaded by the JVM.

The source code was a UTF-8 format file.
what happened
Compilation fine. Could not load class into the JVM.
what expected Should not able to compile these method names.
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-01-28 23:14:16.0
contribution #306. I assigned it to Iuli because I prefer this fixed in the JVM generator rather than the frontend. Or maybe it should the FJBG library.
Iulian  edited on  2007-02-06 12:08:31.0
I think the program should work, Unicode categories Sm and So are allowed by the scanner, as part of operator names. What we should do is encode/decode these names as we do with some operator names. We discussed this before but there was no clear decision, maybe because Sun's JVM has always been liberal w.r.t. to valid names (accepts more than advertised).
Iulian  edited on  2007-03-01 10:42:54.0
We discussed that this is and concluded that it is 'platform specific', so we won't fix.