* don't give an internalerror when trying to explicitly apply an invalid

typecast to an array-of-const (mantis #18267)

git-svn-id: trunk@16749 -
This commit is contained in:
Jonas Maebe 2011-01-11 15:47:56 +00:00
parent 1e92e576dd
commit d76ddcabe6
3 changed files with 17 additions and 0 deletions

1
.gitattributes vendored
View File

@ -10138,6 +10138,7 @@ tests/webtbf/tw17646a.pp svneol=native#text/plain
tests/webtbf/tw1782.pp svneol=native#text/plain
tests/webtbf/tw18096.pp svneol=native#text/pascal
tests/webtbf/tw18096c.pp svneol=native#text/pascal
tests/webtbf/tw18267.pp svneol=native#text/plain
tests/webtbf/tw1827.pp svneol=native#text/plain
tests/webtbf/tw1830.pp svneol=native#text/plain
tests/webtbf/tw1842.pp svneol=native#text/plain

View File

@ -1962,6 +1962,7 @@ implementation
(
not(is_open_array(left.resultdef)) and
not(is_array_constructor(left.resultdef)) and
not(is_array_of_const(left.resultdef)) and
(left.resultdef.size=resultdef.size) and
{ disallow casts of const nodes }
(not is_constnode(left) or

15
tests/webtbf/tw18267.pp Normal file
View File

@ -0,0 +1,15 @@
{ %fail }
program typecasttest;
{$mode objfpc}
procedure Test(const aArgs: array of const);
begin
TVarRec(aArgs);
end;
begin
end.