Scala wizards refuse (valid scala) identifiers that are reserved in java
If you try to create a new class/object/trait with a java keyword as the name or package, it will refuse to create it saying "Type name is not valid. The type name 'int' is not a valid identifier".
This happens with all java keywords: int, void, const, goto, etc.
It's probably not a good idea to name your scala class with a java keyword, but it should be allowed.
Additionally, if you create a folder on the filesystem using a reserved word in java, any files in it will not show up as a package, they will show up as a folder at the very bottom of the src folder.
This happens with all java keywords: int, void, const, goto, etc.
It's probably not a good idea to name your scala class with a java keyword, but it should be allowed.
Additionally, if you create a folder on the filesystem using a reserved word in java, any files in it will not show up as a package, they will show up as a folder at the very bottom of the src folder.
Leave a comment
on 2013-03-11 15:23 *
By Mirco Dotta
Summary changed from New class refuses valid scala identifiers that are reserved in java to Scala wizards refuse (valid scala) identifiers that are reserved in java
Status changed from New to Accepted
on 2013-03-11 15:23 *
By Mirco Dotta
Summary changed from New class refuses valid scala identifiers that are reserved in java to Scala wizards refuse (valid scala) identifiers that are reserved in java
Status changed from New to Accepted
on 2013-03-11 15:25 *
By Mirco Dotta
@dnadolny The code in the example doesn't compile because class int should be an object.
on 2013-03-12 08:19 *
By Mirco Dotta
@dnadolny No problem at all. And thanks a ton for your positive energy, really useful bug reports! :)
on 2014-04-26 14:06 *
By Simon Schäfer
Eclipse version changed from Indigo - Eclipse 3.7 to Kepler - Eclipse 4.3
Version changed from 3.0.0-RC2-210 to 3.0.2-210
Milestone changed from Lithium to -none-
Closing this ticket as fixed, because the wizard this ticket relies on has been removed from the codebase. There is a new wizard which is now used as the default one.