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
Incorrectly generated inner class name #9940
Comments
Imported From: https://issues.scala-lang.org/browse/SI-9940?orig=1 |
@SethTisue said: Addressing just the name clash part: first, note that the inner "Owner" objects aren't necessary to reproduce; "class A { object B }; object A { object B }" is sufficient. The code in nsc/typechecker/SuperAccessors.scala that performs this check was added by Martin back in Scala 2.6 days, here scala/scala@81a4d20b. The same check still exists in Dotty. It isn't obvious to me what would go wrong if the check were removed, but it was certainly put there on purpose. |
@axel22 said: In any case, it seems like there should be no reason why a class and its companion should not both define an inner class with the same name, and the current naming for the inner class of the companion object seems wrong.. |
@soc said: |
@axel22 said: |
closing on the assumption this is just #2034 |
results in the following error message:
It seems like there should be no name clash.
generates a class
Buf$ByteArray$Owned$
. According to the JLS, and if a singleton object is a considered a class with a dollar appended, it should beBuf$$ByteArray$$Owned$
.The text was updated successfully, but these errors were encountered: