Browse Source

Lua: Add some TODOS to check back on later

Justin Donaldson 9 years ago
parent
commit
dd8d2200e9
2 changed files with 3 additions and 1 deletions
  1. 1 0
      genlua.ml
  2. 2 1
      std/lua/Boot.hx

+ 1 - 0
genlua.ml

@@ -1485,6 +1485,7 @@ let generate_enum ctx e =
 	let p = s_path ctx e.e_path in
 	let ename = List.map (fun s -> Printf.sprintf "\"%s\"" (Ast.s_escape s)) (fst e.e_path @ [snd e.e_path]) in
 
+	(* TODO: Unify the _hxClasses declaration *)
 	if has_feature ctx "Type.resolveEnum" then begin
 	    newline ctx;
 	    print ctx "_hxClasses[\"%s\"] = %s" (dot_path e.e_path) p; semicolon ctx; newline ctx;

+ 2 - 1
std/lua/Boot.hx

@@ -90,7 +90,8 @@ class Boot {
 
 		switch( cl ) {
 			case Int:
-				return (untyped __type__(o) == "number" &&  lua.Math.floor(o) == o);
+				// TODO: matching js behavior here, but js behavior clamps.  Is that correct?
+				return (untyped __type__(o) == "number" &&  clamp(o) == o);
 			case Float:
 				return untyped __type__(o) == "number";
 			case Bool: