From 625f52b7e464e129064a90340788f60f06d5f68e Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 20 Aug 2011 08:21:44 +0000 Subject: [PATCH] * make sure that int->int conversions are handled by the generic code * handle class->interface conversions by JVM-specific code git-svn-id: branches/jvmbackend@18655 - --- compiler/jvm/njvmcnv.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/jvm/njvmcnv.pas b/compiler/jvm/njvmcnv.pas index 0a5c71005c..a81cc2da14 100644 --- a/compiler/jvm/njvmcnv.pas +++ b/compiler/jvm/njvmcnv.pas @@ -673,7 +673,10 @@ implementation toarrtype: char; begin resnode:=nil; - if not(convtype in [tc_equal,tc_int_2_int,tc_int_2_bool,tc_bool_2_int]) then + if not(convtype in [tc_equal,tc_int_2_int,tc_int_2_bool,tc_bool_2_int,tc_class_2_intf]) or + ((convtype in [tc_equal,tc_int_2_int,tc_bool_2_int,tc_int_2_bool]) and + ((left.resultdef.typ=orddef) and + (resultdef.typ=orddef))) then begin result:=false; exit