mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-23 20:16:10 +02:00
* 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:
parent
1e92e576dd
commit
d76ddcabe6
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
15
tests/webtbf/tw18267.pp
Normal file
@ -0,0 +1,15 @@
|
||||
{ %fail }
|
||||
|
||||
program typecasttest;
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
procedure Test(const aArgs: array of const);
|
||||
begin
|
||||
TVarRec(aArgs);
|
||||
end;
|
||||
|
||||
begin
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user