* fix for Mantis #28753: don't return generic dummys from single_type(); ensures that parameters correctly evaluate to error defs should generic dummies be used

git-svn-id: trunk@34534 -
This commit is contained in:
svenbarth 2016-09-16 20:40:19 +00:00
parent e4f1b15860
commit 386b7ac154
3 changed files with 41 additions and 15 deletions

1
.gitattributes vendored
View File

@ -13734,6 +13734,7 @@ tests/webtbf/tw2853.pp svneol=native#text/plain
tests/webtbf/tw2853a.pp svneol=native#text/plain
tests/webtbf/tw2853b.pp svneol=native#text/plain
tests/webtbf/tw2853c.pp svneol=native#text/plain
tests/webtbf/tw28753.pp svneol=native#text/pascal
tests/webtbf/tw2878.pp svneol=native#text/plain
tests/webtbf/tw2972.pp svneol=native#text/plain
tests/webtbf/tw2972b.pp svneol=native#text/plain

View File

@ -588,8 +588,9 @@ implementation
end;
end
else if (def.typ=undefineddef) and
(sp_generic_dummy in srsym.symoptions) and
parse_generic and
(sp_generic_dummy in srsym.symoptions) then
begin
if parse_generic and
(current_genericdef.typ in [recorddef,objectdef]) and
(Pos(upper(srsym.realname),tabstractrecorddef(current_genericdef).objname^)=1) then
begin
@ -609,6 +610,12 @@ implementation
else
def:=current_genericdef;
end
else
begin
Message(parser_e_no_generics_as_types);
def:=generrordef;
end;
end
else if is_classhelper(def) and
not (stoParseClassParent in options) then
begin

18
tests/webtbf/tw28753.pp Normal file
View File

@ -0,0 +1,18 @@
{ %FAIL }
unit tw28753;
{$mode delphi}
interface
type
TList<T> = class(TObject);
implementation
procedure ObjectListToJson(Value: TList);
begin // Error: Internal error 200301231
end;
end.