Explorar el Código

[java/cs] fixed "X should not return null for Int/Float/Bool". Fixes Issue #781

Caue Waneck hace 13 años
padre
commit
3a146e7ff8
Se han modificado 4 ficheros con 5 adiciones y 5 borrados
  1. 1 1
      std/cs/_std/Reflect.hx
  2. 1 1
      std/cs/_std/Std.hx
  3. 2 2
      std/java/_std/Reflect.hx
  4. 1 1
      std/java/_std/Std.hx

+ 1 - 1
std/cs/_std/Reflect.hx

@@ -91,7 +91,7 @@
 	**/
 	public static function isFunction( f : Dynamic ) : Bool
 	{
-		return null;
+		return false;
 	}
 
 	/**

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

@@ -71,7 +71,7 @@ import haxe.lang.Exceptions;
 			}
 	')
 	public static function parseFloat( x : String ) : Float {
-		return null;
+		return 0.0;
 	}
 
 	public static function random( x : Int ) : Int {

+ 2 - 2
std/java/_std/Reflect.hx

@@ -130,7 +130,7 @@
 	')
 	public static function isFunction( f : Dynamic ) : Bool
 	{
-		return null;
+		return false;
 	}
 
 	/**
@@ -141,7 +141,7 @@
 	')
 	public static function compare<T>( a : T, b : T ) : Int
 	{
-		return null;
+		return 0;
 	}
 
 	/**

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

@@ -198,7 +198,7 @@ import haxe.lang.Exceptions;
 		}
 	')
 	public static function parseFloat( x : String ) : Float {
-		return null;
+		return 0.0;
 	}
 
 	public static function random( x : Int ) : Int {