Explorar o código

[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 %!s(int64=10) %!d(string=hai) anos
pai
achega
9dc6052dad
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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;
 	}