summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/cfileutl.pas2
-rw-r--r--compiler/defcmp.pas2
-rw-r--r--compiler/symdef.pas10
3 files changed, 12 insertions, 2 deletions
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:=