diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-02-09 19:33:20 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-03-11 15:18:22 -0700 |
commit | a4e71b188fe8069b4de3a0753defb624b8b1eb8c (patch) | |
tree | 1db043db5e1a84568595413fc5c2ea77679ae0eb /test/files/run/iterator-from.scala | |
parent | f8bb3d5289e5eb84ccd94386e5c3df1bdf8b91bc (diff) | |
download | scala-a4e71b188fe8069b4de3a0753defb624b8b1eb8c.tar.gz scala-a4e71b188fe8069b4de3a0753defb624b8b1eb8c.tar.bz2 scala-a4e71b188fe8069b4de3a0753defb624b8b1eb8c.zip |
Cast receiver if necessary when rewriting trait calls to impl method
The self parameter type may be incompatible with the trait type.
trait T { self: S => def foo = 1 }
The $self parameter type of T$class.foo is S, which may be unrelated
to T. If we re-write a call to T.foo to T$class.foo, we need to cast
the receiver to S, otherwise we get a VerifyError.
Diffstat (limited to 'test/files/run/iterator-from.scala')
0 files changed, 0 insertions, 0 deletions