Browse Source

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

Cauê Waneck 11 years ago
parent
commit
48a88705d3
1 changed files with 1 additions and 1 deletions
  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;
 	}