Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | SI-6551 Expand test case into uncomfortable areas. | Jason Zaugg | 2013-01-29 | 1 | -11/+18 |
| | | | | | | | | | | | | | | | | | | trait T { type U } class A(val a: T) extends AnyVal { def foo[TT <: a.U] = 0 } It works! But it's pure serendipity. After extmethods, the careful student of ASTs will find: object A { final def foo$extension[TT >: Nothing <: A.this.a.U]($this: A): Int = 0; } `A.this` doesn't belong. For now we just include this case under our test umbrella. | ||||
* | SI-6651 Substitute `this` in extension method sigs | Jason Zaugg | 2013-01-29 | 1 | -0/+26 |
This allows for the likes of: class A[X](val x: X) extends AnyVal { def foo(xy: x.Y) {} } We have to do this in both directions, when synthesizing the extension method in `Extender#transform`, and later on when Erasure tries to find the corresponding extension methods by backing out the original signatures from the signatures of the synthesized methods in the companion. In the first case, we have to be careful to use a stable reference to the `self` parameter, which can satisfy the dependent types. |