소스 검색

[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;
 	}