forked from HaxeFoundation/haxe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deal with same-class-calls in abstract closures (closes HaxeFoundatio…
- Loading branch information
Showing
3 changed files
with
41 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package unit.issues; | ||
import unit.Test; | ||
|
||
private abstract MyAbstract(Int) { | ||
public inline function new() { | ||
this = 1; | ||
} | ||
|
||
public function test() { | ||
var f = function() return get(); | ||
return f; | ||
} | ||
|
||
function get() return this; | ||
} | ||
|
||
class Issue2823 extends Test { | ||
function test() { | ||
var a = new MyAbstract(); | ||
eq(1, a.test()()); | ||
} | ||
} |
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