Browse Source

fix map cast recursion

Simon Krajewski 11 years ago
parent
commit
0cf343097a
2 changed files with 4 additions and 4 deletions
  1. 1 1
      codegen.ml
  2. 3 3
      std/Map.hx

+ 1 - 1
codegen.ml

@@ -700,7 +700,7 @@ module Abstract = struct
 						(* let eright = mk (TCast(eright,None)) tleft p in *)
 						do_check_cast ctx tcf eright p
 				| Some cf,Some c ->
-					make_static_call ctx c cf a tl [eright] tleft p
+					recurse cf (fun () -> make_static_call ctx c cf a tl [eright] tleft p)
 				| _ ->
 					assert false
 		in

+ 3 - 3
std/Map.hx

@@ -150,15 +150,15 @@ abstract Map<K,V>(IMap<K,V> ) {
 	}
 
 	@:from static inline function fromStringMap<V>(map:StringMap<V>):Map< String, V > {
-		return map;
+		return cast map;
 	}
 
 	@:from static inline function fromIntMap<V>(map:IntMap<V>):Map< Int, V > {
-		return map;
+		return cast map;
 	}
 
 	@:from static inline function fromObjectMap<K:{ }, V>(map:ObjectMap<K,V>):Map<K,V> {
-		return map;
+		return cast map;
 	}
 }