summaryrefslogtreecommitdiff
path: root/test/files/run/valueClassSelfType.scala
Commit message (Collapse)AuthorAgeFilesLines
* Don't crash GenBCode for value classes with a self declarationLukas Rytz2015-04-161-0/+52
If a value class has a self declaration class V(x: Long) extends AnyVal { self => /* ... */ } `vClassSymbol.typeOfThis.typeSymbol` is `class Long` in the backend. The InlineInfo for traits contains a field for the self type of the trait. This is required for re-writing calls to final trait methods to the static implementation method: the self type appears in the impl method signature. By mistake, the backend was recording the self type of all classes, not only of traits. In the case of a value class with a self declaration, this broke the assumption that the self type is always a class type (not a primitive type). The simple fix: only record the self type for traits.