summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-04-16 21:56:30 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2015-04-16 21:56:30 +0200
commit2fbd539e353fd9d234f9a633d7606529d871d939 (patch)
tree5b04839c2c8942be64c88abad41d94a21b78afdb /CONTRIBUTING.md
parentd2a174d27bce392329a9c5e4c7d2acee263cdb34 (diff)
downloadscala-2fbd539e353fd9d234f9a633d7606529d871d939.tar.gz
scala-2fbd539e353fd9d234f9a633d7606529d871d939.tar.bz2
scala-2fbd539e353fd9d234f9a633d7606529d871d939.zip
Don't crash GenBCode for value classes with a self declaration
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.
Diffstat (limited to 'CONTRIBUTING.md')
0 files changed, 0 insertions, 0 deletions