Skip to content

Instantly share code, notes, and snippets.

View hotpotato's full-sized avatar

frabbit hotpotato

View GitHub Profile
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>()
}
package ;
interface Car
{
public function doIt():Void;
}
class Main
{
public static function main():Void
trait Position {
private var y:Int;
public function getX():Int;
public function getY():Int {
return y;
}
}
class Hero with Position {
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];
/*
* 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