* don't crash when ranges are passed erroneously to an array of const, resolves

git-svn-id: trunk@11353 -
This commit is contained in:
florian 2008-07-09 21:06:24 +00:00
parent f4c51462ad
commit fffc05731c
3 changed files with 9 additions and 3 deletions

1
.gitattributes vendored
View File

@ -7937,6 +7937,7 @@ tests/webtbf/tw11254a.pp svneol=native#text/plain
tests/webtbf/tw11295a.pp svneol=native#text/plain
tests/webtbf/tw11295b.pp svneol=native#text/plain
tests/webtbf/tw1157a.pp svneol=native#text/plain
tests/webtbf/tw11632.pp svneol=native#text/plain
tests/webtbf/tw1238.pp svneol=native#text/plain
tests/webtbf/tw1251a.pp svneol=native#text/plain
tests/webtbf/tw1270.pp svneol=native#text/plain

View File

@ -798,10 +798,8 @@ implementation
function tarrayconstructorrangenode.pass_1 : tnode;
begin
firstpass(left);
firstpass(right);
expectloc:=LOC_CREFERENCE;
result:=nil;
CGMessage(parser_e_illegal_expression);
end;

7
tests/webtbf/tw11632.pp Normal file
View File

@ -0,0 +1,7 @@
{ %fail }
{$mode objfpc}
program crash1;
procedure a(b: array of const); begin end;
begin
a([0..1]);
end.