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
class Future<T> { | |
var t:T; | |
public function new () {} | |
public function setValue (t:T) { this.t = t; } | |
} | |
class Futures { | |
public static function create<T>():Future<T> return new Future<T>() | |
} |
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
package ; | |
interface Car | |
{ | |
public function doIt():Void; | |
} | |
class Main | |
{ | |
public static function main():Void |
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
trait Position { | |
private var y:Int; | |
public function getX():Int; | |
public function getY():Int { | |
return y; | |
} | |
} | |
class Hero with Position { | |
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
package; | |
import haxe.rtti.Meta; | |
interface TestInterface { } | |
interface TestClass implements TestInterface { } | |
class Main | |
{ | |
static function getImplements (className:String) { | |
var rtti = Meta.getType(Main).rtti[0]; |
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
/* | |
* Copyright (c) 2005, The haXe Project Contributors | |
* All rights reserved. | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* - Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* - Redistributions in binary form must reproduce the above copyright | |
* notice, this list of conditions and the following disclaimer in the |