From 5903b878bca4698a1f3bfa4d7fcafe396be4012f Mon Sep 17 00:00:00 2001 From: jonas Date: Fri, 27 Apr 2012 19:16:06 +0000 Subject: * leave jvmbackend branch in a proper state (fixes from trunk merge) --- Merging r21075 through r21076 into '.': U Makefile.fpc U compiler/symdef.pas U compiler/defcmp.pas U Makefile --- Merging r21078 into '.': U compiler/cfileutl.pas git-svn-id: http://svn.freepascal.org/svn/fpc/branches/jvmbackend@21083 3ad0048d-3df7-0310-abae-a5850022a9f2 --- compiler/cfileutl.pas | 2 +- compiler/defcmp.pas | 2 +- compiler/symdef.pas | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'compiler') diff --git a/compiler/cfileutl.pas b/compiler/cfileutl.pas index ad275e2044..0fae786e0a 100644 --- a/compiler/cfileutl.pas +++ b/compiler/cfileutl.pas @@ -1506,7 +1506,7 @@ end; var quote_script: tscripttype; begin - if not(cs_link_on_target in current_settings.globalswitches) then + if (cs_link_on_target in current_settings.globalswitches) then quote_script:=target_info.script else quote_script:=source_info.script; diff --git a/compiler/defcmp.pas b/compiler/defcmp.pas index cb17f59d1a..2034171305 100644 --- a/compiler/defcmp.pas +++ b/compiler/defcmp.pas @@ -764,7 +764,7 @@ implementation begin { ugly, but delphi allows it } if (cdo_explicit in cdoptions) and - is_class_or_interface_or_objc_or_java(def_from) then + is_class_or_interface_or_dispinterface_or_objc_or_java(def_from) then begin { in Java enums /are/ class instances, and hence such typecasts must not be treated as integer-like diff --git a/compiler/symdef.pas b/compiler/symdef.pas index a45bc25cfb..8eda47a1e5 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -950,6 +950,7 @@ interface function is_class_or_interface(def: tdef): boolean; function is_class_or_interface_or_objc(def: tdef): boolean; function is_class_or_interface_or_objc_or_java(def: tdef): boolean; + function is_class_or_interface_or_dispinterface_or_objc_or_java(def: tdef): boolean; function is_class_or_interface_or_object(def: tdef): boolean; function is_class_or_interface_or_dispinterface(def: tdef): boolean; function is_implicit_pointer_object_type(def: tdef): boolean; @@ -6605,6 +6606,15 @@ implementation end; + function is_class_or_interface_or_dispinterface_or_objc_or_java(def: tdef): boolean; + begin + result:= + assigned(def) and + (def.typ=objectdef) and + (tobjectdef(def).objecttype in [odt_class,odt_interfacecom,odt_interfacecorba,odt_dispinterface,odt_objcclass,odt_objcprotocol,odt_javaclass,odt_interfacejava]); + end; + + function is_class_or_interface_or_object(def: tdef): boolean; begin result:= -- cgit v1.2.1