Skip to content

Instantly share code, notes, and snippets.

@AxGord
Created October 2, 2013 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AxGord/6791072 to your computer and use it in GitHub Desktop.
Save AxGord/6791072 to your computer and use it in GitHub Desktop.
package ;
import neko.Lib;
using Main;
/**
* ...
* @author AxGord <axgord@gmail.com>
*/
class Main {
static function main() {
var b:Int = 4;
b.bindx();
}
static public function bindx(v:Bindable) {
}
}
abstract Bindable(Int) to Int {
function new(a:Int) {
this = a;
}
@:op(A + B) inline static public function add(lhs:Bindable, rhs:Int):Int return lhs + rhs;
@:from static public function from(a:Int)
{
trace("from " + a);
return new Bindable(a);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment