diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2015-11-19 13:31:00 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-02-01 13:23:19 +1000 |
commit | 907fe03e57b3cac4d0a67663edcd2b3b040e6ff8 (patch) | |
tree | c581c7b26ee2d8774ac0a084f56ee4f7464b1250 /test/files/neg/t8525.scala | |
parent | 78f0437ac06e71a94a38721751ef5d36ca62c062 (diff) | |
download | scala-907fe03e57b3cac4d0a67663edcd2b3b040e6ff8.tar.gz scala-907fe03e57b3cac4d0a67663edcd2b3b040e6ff8.tar.bz2 scala-907fe03e57b3cac4d0a67663edcd2b3b040e6ff8.zip |
SI-9542 Fix regression in value classes with enclosing refs
In SI-9473 / e2653736, I changed `mkAttributedRef` to avoid prefixing
references to statically owned symbols with a `ThisType`.
Turns out there was one place that depended on the old behaviour.
```
object Outer {
trait T
class C(val value: Any) extends AnyVal {
def foo(t: T) = expr
}
}
```
Is translated to:
```
object Outer {
trait T
class C(val value: Any) extends AnyVal {
def foo(t: T) = Outer.this.C.foo$extension(C.this, t)
}
object C {
def foo$extension($this: C, t: T) = expr
}
}
```
After the change, the forwarder was instead:
```
def foo(t: T) = Outer.C.foo$extension(C.this, t)
```
Note: this change is not actually necessary after the following
commit that makes subtyping unify the different module class
reference, that alone is enough to make the enclosed test
pass.
Diffstat (limited to 'test/files/neg/t8525.scala')
0 files changed, 0 insertions, 0 deletions