瀏覽代碼

[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 年之前
父節點
當前提交
9dc6052dad
共有 1 個文件被更改,包括 1 次插入0 次删除
  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;
 	}