2
0
Эх сурвалжийг харах

[java] unwonkify the check for optimization of Std.is (#5168)

Aleksandr Kuzmenko 6 жил өмнө
parent
commit
fb442ef3a7

+ 1 - 6
src/generators/genjava.ml

@@ -198,11 +198,6 @@ let mk_cast_if_needed t_to e =
 	else
 		mk_cast t_to e
 
-let is_reference_type t =
-	match Abstract.follow_with_abstracts t with
-	| TAbstract _ -> false
-	| _ -> true
-
 (* ******************************************* *)
 (* JavaSpecificESynf *)
 (* ******************************************* *)
@@ -309,7 +304,7 @@ struct
 								| _ -> { e with eexpr = TBlock([run obj; { e with eexpr = TConst(TBool true) }]) }
 							)
 						| _ ->
-							if is_reference_type obj.etype then
+							if not (is_java_basic_type obj.etype) then
 								try
 									Type.unify obj.etype (type_of_module_type md);
 									mk_is false obj md