Browse Source

fixed @:to order in UInt (closes #2496)

Simon Krajewski 11 years ago
parent
commit
67ec749935
1 changed files with 5 additions and 5 deletions
  1. 5 5
      std/UInt.hx

+ 5 - 5
std/UInt.hx

@@ -213,8 +213,8 @@ abstract UInt(Int) from Int {
 		return Std.string(toFloat());
 		return Std.string(toFloat());
 	}
 	}
 
 
-	@:to private inline function toDynamic():Dynamic {
-		return toFloat();
+	@:to private inline function toInt():Int {
+		return this;
 	}
 	}
 
 
 	@:to private inline function toFloat():Float {
 	@:to private inline function toFloat():Float {
@@ -226,9 +226,9 @@ abstract UInt(Int) from Int {
 			return int;
 			return int;
 		}
 		}
 	}
 	}
-
-	@:to private inline function toInt():Int {
-		return this;
+	
+	@:to private inline function toDynamic():Dynamic {
+		return toFloat();
 	}
 	}
 
 
 }
 }