-
-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[typer] fix forwarded static extension priority
- Loading branch information
Showing
3 changed files
with
106 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package unit.issues; | ||
|
||
class Issue9680 extends Test { | ||
function test() { | ||
var foo: Foo = 0; | ||
eq('Foo using', foo.ext()); | ||
eq('Foo resolve', foo.baz); | ||
|
||
var bar: Bar = foo; | ||
eq('Bar using', bar.ext()); | ||
eq('Bar resolve', bar.baz); | ||
} | ||
} | ||
|
||
@:using(Issue9680.Issue9680_FooTools) | ||
private abstract Foo(Int) from Int { | ||
@:op(a.b) function resolve(name:String) | ||
return 'Foo resolve'; | ||
} | ||
|
||
@:using(Issue9680.Issue9680_BarTools) | ||
@:forward | ||
private abstract Bar(Foo) from Foo { | ||
@:op(a.b) function resolve(name:String) | ||
return 'Bar resolve'; | ||
} | ||
|
||
class Issue9680_FooTools { | ||
public static function ext(that: Foo) | ||
return 'Foo using'; | ||
} | ||
|
||
class Issue9680_BarTools { | ||
public static function ext(that: Bar) | ||
return 'Bar using'; | ||
} |