mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 21:48:35 +02:00
Fix for Mantis #21015 .
symdef.pas: * tobjectdef.find_implemented_interface: use equal_defs to ensure that equal specializations of interfaces are found as well * getparaencoding: use globals.CP_NONE instead of just CP_NONE, because defcmp contains a cp_none enum as well. + added test git-svn-id: trunk@25609 -
This commit is contained in:
parent
e72db83b71
commit
bb00c76fe7
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -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
|
||||
|
@ -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;
|
||||
|
14
tests/webtbs/tw21015.pp
Normal file
14
tests/webtbs/tw21015.pp
Normal file
@ -0,0 +1,14 @@
|
||||
{ %NORUN }
|
||||
|
||||
program tw21015;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
uses
|
||||
uw21015;
|
||||
|
||||
var
|
||||
x: IIntTest;
|
||||
begin
|
||||
x := TGenImpl<Integer>.Create;
|
||||
end.
|
17
tests/webtbs/uw21015.pp
Normal file
17
tests/webtbs/uw21015.pp
Normal file
@ -0,0 +1,17 @@
|
||||
unit uw21015;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
interface
|
||||
|
||||
type
|
||||
ITest<T> = interface
|
||||
end;
|
||||
|
||||
TGenImpl<T> = class (TInterfacedObject,ITest<T>)
|
||||
end;
|
||||
|
||||
IIntTest = Itest<Integer>;
|
||||
implementation
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user