diff --git a/.gitattributes b/.gitattributes index 2de1992b7d..bce3c63d0a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13404,6 +13404,7 @@ tests/webtbs/tw20995a.pp svneol=native#text/pascal tests/webtbs/tw20995b.pp svneol=native#text/pascal tests/webtbs/tw20996.pp svneol=native#text/pascal tests/webtbs/tw20998.pp svneol=native#text/pascal +tests/webtbs/tw21015.pp svneol=native#text/pascal tests/webtbs/tw21029.pp svneol=native#text/plain tests/webtbs/tw21044.pp svneol=native#text/pascal tests/webtbs/tw21051.pp svneol=native#text/pascal @@ -14356,6 +14357,7 @@ tests/webtbs/uw20909a.pas svneol=native#text/pascal tests/webtbs/uw20909b.pas svneol=native#text/pascal tests/webtbs/uw20940.pp svneol=native#text/pascal tests/webtbs/uw20996.pp svneol=native#text/pascal +tests/webtbs/uw21015.pp svneol=native#text/pascal tests/webtbs/uw21538.pp svneol=native#text/pascal tests/webtbs/uw21808a.pp svneol=native#text/plain tests/webtbs/uw21808b.pp svneol=native#text/plain diff --git a/compiler/symdef.pas b/compiler/symdef.pas index 90b89a0a80..778d13dc18 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -1087,7 +1087,7 @@ implementation { target } systems,paramgr, { symtable } - symsym,symtable,defutil,objcdef, + symsym,symtable,defutil,objcdef,defcmp, {$ifdef jvm} jvmdef, {$endif} @@ -1150,7 +1150,7 @@ implementation that concatenation shouldn't be converted to defaultsystemcodepage if all strings have the same type } result:=tstringdef(def).encoding; - if result=CP_NONE then + if result=globals.CP_NONE then result:=0 end; @@ -6488,7 +6488,7 @@ implementation for i:=0 to ImplementedInterfaces.Count-1 do begin ImplIntf:=TImplementedInterface(ImplementedInterfaces[i]); - if ImplIntf.intfdef=aintfdef then + if equal_defs(implintf.intfdef,aintfdef) then begin result:=ImplIntf; exit; diff --git a/tests/webtbs/tw21015.pp b/tests/webtbs/tw21015.pp new file mode 100644 index 0000000000..70343667cc --- /dev/null +++ b/tests/webtbs/tw21015.pp @@ -0,0 +1,14 @@ +{ %NORUN } + +program tw21015; + +{$mode delphi} + +uses + uw21015; + +var + x: IIntTest; +begin + x := TGenImpl.Create; +end. \ No newline at end of file diff --git a/tests/webtbs/uw21015.pp b/tests/webtbs/uw21015.pp new file mode 100644 index 0000000000..9033033839 --- /dev/null +++ b/tests/webtbs/uw21015.pp @@ -0,0 +1,17 @@ +unit uw21015; + +{$mode delphi} + +interface + +type + ITest = interface + end; + + TGenImpl = class (TInterfacedObject,ITest) + end; + + IIntTest = Itest; +implementation + +end. \ No newline at end of file