Selaa lähdekoodia

[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 vuotta sitten
vanhempi
commit
9dc6052dad
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  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;
 	}