diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-04-16 21:56:30 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-04-16 21:56:30 +0200 |
commit | 2fbd539e353fd9d234f9a633d7606529d871d939 (patch) | |
tree | 5b04839c2c8942be64c88abad41d94a21b78afdb /test/files/run/reify_nested_inner_refers_to_global.check | |
parent | d2a174d27bce392329a9c5e4c7d2acee263cdb34 (diff) | |
download | scala-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 'test/files/run/reify_nested_inner_refers_to_global.check')
0 files changed, 0 insertions, 0 deletions