Parcourir la source

[php7] fix ocaml error caused by -2147483648 in ml sources

Alexander Kuzmenko il y a 9 ans
Parent
commit
91aac01cc5
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/generators/genphp7.ml

+ 1 - 1
src/generators/genphp7.ml

@@ -1705,7 +1705,7 @@ class virtual type_builder ctx wrapper =
 				| TSuper -> self#write "parent"
 				| TInt value ->
 					(* See https://github.com/HaxeFoundation/haxe/issues/5289 *)
-					if (Int32.to_int value) = -2147483648 then
+					if value = Int32.min_int then
 						self#write "((int)-2147483648)"
 					else
 						self#write (Int32.to_string value)