Skip to content

Class names and case sesitivity #1454

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

Closed
DarkDimius opened this issue Aug 16, 2016 · 5 comments
Closed

Class names and case sesitivity #1454

DarkDimius opened this issue Aug 16, 2016 · 5 comments

Comments

@DarkDimius
Copy link
Contributor

scala.collection.immutable.Stream defines inner class Cons and an inner object cons.
The second one triggers creation of a class cons with static forwarders, that are used in separate compilation and that bears TASTY.
OS X has case-insensitive filesystem and Cons.class and cons.class overwrite each-other.

Manifests itself with a funny exception:

Exception in thread "main" java.lang.NoClassDefFoundError:
scala/collection/immutable/Stream$Cons (wrong name: scala/collection/immutable/Stream$cons)
@smarter
Copy link
Member

smarter commented Aug 17, 2016

How come this issue does not manifest itself with scalac?

@smarter
Copy link
Member

smarter commented Aug 17, 2016

Also, is there any way to fix this other than completely disallowing classes to have the same case-insensitive name?

@Jasper-M
Copy link
Contributor

Scalac doesn't generate a class with static forwarders for inner objects. For toplevel objects and classes it has the same issue on OS X.

@odersky
Copy link
Contributor

odersky commented Feb 2, 2017

Seen that this is not fixed by scalac either, I change to enhancement

@smarter
Copy link
Member

smarter commented Jan 11, 2018

Scalac doesn't generate a class with static forwarders for inner objects

Dotty doesn't either since #2703 so closing. The case-sensitivity issue is discussed in #1077

@smarter smarter closed this as completed Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants