Bläddra i källkod

[as3] dodge ambiguous Type issue

The pattern matcher inserts calls to Type.enumIndex, but that doesn't work very well if it's not inlined (as default on As3) and if the current package also has a Type type. Ideally we would have a proper AST node for enumIndex, but this should be a good workaround.
Simon Krajewski 10 år sedan
förälder
incheckning
9dc6052dad
1 ändrade filer med 1 tillägg och 0 borttagningar
  1. 1 0
      std/flash/_std/Type.hx

+ 1 - 0
std/flash/_std/Type.hx

@@ -269,6 +269,7 @@ enum ValueType {
 		return untyped if( e.params == null ) [] else e.params;
 	}
 
+	@:extern
 	public inline static function enumIndex( e : EnumValue ) : Int {
 		return untyped e.index;
 	}