浏览代码

[java] Fix Std.instance - because of constraints, the type was being cast to the expected type in the argument call

Cauê Waneck 11 年之前
父节点
当前提交
48a88705d3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      std/java/_std/Std.hx

+ 1 - 1
std/java/_std/Std.hx

@@ -240,7 +240,7 @@ import java.internal.Exceptions;
 		return 0.0;
 	}
 
-	public static function instance<T:{},S:T>( value : T, c : Class<S> ) : S {
+	inline public static function instance<T:{},S:T>( value : T, c : Class<S> ) : S {
 		return Std.is(value, c) ? cast value : null;
 	}