Aleksandar Prokopec created an issue
Scala Programming Language / SI-9940 Incorrectly generated inner class name
Issue Type: Bug Assignee: Lukas Rytz Components: Compiler Backend Created: 29/Sep/16 6:20 PM Priority: Major Reporter: Aleksandar Prokopec
1. This code:
class Buf { class ByteArray { object Owned } } object Buf { object ByteArray { object Owned } }results in the following error message:
test.scala:3: error: name clash: class Buf defines class ByteArray and its companion object Buf also defines object ByteArray class ByteArray { ^ one error foundIt seems like there should be no name clash.
2. This code:
object Buf { object ByteArray { object Owned } }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 be Buf$$ByteArray$$Owned$.
Add Comment
This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)