Skip to content

We should issue warning on class names that differ only in case #1077

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
odersky opened this issue Feb 12, 2016 · 2 comments
Closed

We should issue warning on class names that differ only in case #1077

odersky opened this issue Feb 12, 2016 · 2 comments

Comments

@odersky
Copy link
Contributor

odersky commented Feb 12, 2016

Given this program

class A
class a

object Test {
  def main(args: Array[String]): Unit = {
    new a
    new A
  }
}

scalac issues this warning:

pos.scala:2: warning: Class a differs only in case from A. Such classes will overwrite one another on case-insensitive filesystems.
class a
      ^

I think dotc should do the same. Also affects pending/run/t920.scala which has a similar problem involving class/object on MacOS and Windows.

OlivierBlanvillain pushed a commit to OlivierBlanvillain/dotty that referenced this issue Dec 8, 2016
Fixed scala#1077 by not mangling private constructor names.
OlivierBlanvillain pushed a commit to OlivierBlanvillain/dotty that referenced this issue Dec 12, 2016
Fixed scala#1077 by not mangling private constructor names.
@smarter
Copy link
Member

smarter commented Jan 11, 2018

@nicolasstucki
Copy link
Contributor

Fixed by #3897

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