Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @:structInit
- class Test {
- static function main() {
- // Equivalent to var obj = new Test(0, 1);
- var obj:Test = { x:0, y:1 };
- }
- public function new (x:Int, y:Int) {
- this.x = x;
- this.y = y;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement