* fix for Mantis #32118: also provide a range for undefined defs

+ added test

git-svn-id: trunk@36723 -
This commit is contained in:
svenbarth 2017-07-10 19:47:21 +00:00
parent ca78bfffae
commit 0c42b6f44a
3 changed files with 24 additions and 0 deletions

1
.gitattributes vendored
View File

@ -15629,6 +15629,7 @@ tests/webtbs/tw3197.pp svneol=native#text/plain
tests/webtbs/tw3207.pp svneol=native#text/plain
tests/webtbs/tw3210.pp svneol=native#text/plain
tests/webtbs/tw32111.pp svneol=native#text/pascal
tests/webtbs/tw32118.pp svneol=native#text/pascal
tests/webtbs/tw3212.pp svneol=native#text/plain
tests/webtbs/tw3214.pp svneol=native#text/plain
tests/webtbs/tw3216.pp svneol=native#text/plain

View File

@ -1071,6 +1071,11 @@ implementation
l:=int64(tarraydef(def).lowrange);
h:=int64(tarraydef(def).highrange);
end;
undefineddef:
begin
l:=torddef(sizesinttype).low;
h:=torddef(sizesinttype).high;
end;
else
internalerror(200611054);
end;

18
tests/webtbs/tw32118.pp Normal file
View File

@ -0,0 +1,18 @@
{ %NORUN }
program tw32118;
{$MODE OBJFPC}
type
generic TTestClass<SomeTemplate> = class
procedure Test;
end;
procedure TTestClass.Test;
var
i : SomeTemplate;
begin
for i := 1 to 10 do WriteLn(i);
end;
begin
end.