Skip to content

Instantly share code, notes, and snippets.

@martinwells
Created February 4, 2014 22:29
Show Gist options
  • Save martinwells/8813653 to your computer and use it in GitHub Desktop.
Save martinwells/8813653 to your computer and use it in GitHub Desktop.
Haxe generic type comparison
public function compareTypes(a:Dynamic, b:Dynamic)
{
return (Type.getClass(a) != null) ? (Type.getClass(a) == Type.getClass(b)) : (Type.typeof(a) == Type.typeof(b));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment