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.
allow closure creation on extern static inline methods (closes HaxeFo…
- Loading branch information
Showing
2 changed files
with
66 additions
and
6 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,26 @@ | ||
package unit.issues; | ||
import unit.Test; | ||
|
||
private extern class Ext { | ||
static inline var v = "foo"; | ||
|
||
public function new() { } | ||
|
||
public inline function test():Void { } | ||
|
||
static inline function test2():String { | ||
return v; | ||
} | ||
} | ||
|
||
class Issue2813 extends Test { | ||
function test() { | ||
var f = Ext.test2; | ||
eq("foo", f()); | ||
|
||
t(unit.TestType.typeError({ | ||
var e = new Ext(); | ||
var f = e.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