Created
February 4, 2014 22:29
-
-
Save martinwells/8813653 to your computer and use it in GitHub Desktop.
Haxe generic type comparison
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
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