|
@@ -618,15 +618,15 @@ class builder jc name jsig = object(self)
|
|
|
| TObject((["java";"lang"],"String"),_),_ when allow_to_string ->
|
|
|
self#expect_reference_type;
|
|
|
self#invokestatic (["haxe";"jvm"],"Jvm") "toString" (method_sig [object_sig] (Some string_sig))
|
|
|
- | TObject(path1,_),TObject(path2,_) ->
|
|
|
- if path1 = object_path then begin
|
|
|
+ | TObject(path1,_),t2 ->
|
|
|
+ if is_unboxed t2 then
|
|
|
+ self#expect_reference_type
|
|
|
+ else if path1 = object_path then begin
|
|
|
(* We should never need a checkcast to Object, but we should adjust the stack so stack maps are wide enough *)
|
|
|
ignore(code#get_stack#pop);
|
|
|
code#get_stack#push object_sig
|
|
|
end else
|
|
|
- code#checkcast path1;
|
|
|
- | TObject(path,_),TTypeParameter _ ->
|
|
|
- code#checkcast path
|
|
|
+ code#checkcast path1
|
|
|
| TMethod _,TMethod _ ->
|
|
|
()
|
|
|
| TMethod _,_ ->
|