-
-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[php] test case dynamic method and empty constructor (closes #4723)
- Loading branch information
1 parent
9dc5d1b
commit 3e7e7c7
Showing
1 changed file
with
25 additions
and
0 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,25 @@ | ||
package unit.issues; | ||
|
||
import haxe.Json; | ||
|
||
class Issue4723 extends unit.Test { | ||
function test() { | ||
var t = new NoNormalMethods(); | ||
eq(10, t.test()); | ||
|
||
var t = new HasNormalMethod(); | ||
eq(10, t.test()); | ||
eq(20, t.test2()); | ||
} | ||
} | ||
|
||
private class NoNormalMethods { | ||
public function new() {} | ||
public dynamic function test() return 10; | ||
} | ||
|
||
private class HasNormalMethod { | ||
public function new() {} | ||
public dynamic function test() return 10; | ||
public function test2() return 20; | ||
} |