ninl.pas, tinlinenode.pass_typecheck: an intrinsic which has a generic type parameter as argument is left as is (e.g. a call) and thus this needs to be respected when typechecking a SizeOf. Fixes Mantis #21592.

git-svn-id: trunk@21497 -
This commit is contained in:
svenbarth 2012-06-06 14:41:12 +00:00
parent bf9cb352b3
commit 7332a0f801
3 changed files with 14 additions and 1 deletions

1
.gitattributes vendored
View File

@ -12601,6 +12601,7 @@ tests/webtbs/tw21551.pp svneol=native#text/plain
tests/webtbs/tw2158.pp svneol=native#text/plain
tests/webtbs/tw2159.pp svneol=native#text/plain
tests/webtbs/tw21592.pp svneol=native#text/pascal
tests/webtbs/tw21592b.pp svneol=native#text/pascal
tests/webtbs/tw21593.pp svneol=native#text/pascal
tests/webtbs/tw2163.pp svneol=native#text/plain
tests/webtbs/tw21654.pp svneol=native#text/pascal

View File

@ -2474,7 +2474,8 @@ implementation
begin
{ the constant evaluation of in_sizeof_x happens in pexpr where possible }
set_varstate(left,vs_read,[]);
if paramanager.push_high_param(vs_value,left.resultdef,current_procinfo.procdef.proccalloption) then
if (left.resultdef.typ<>undefineddef) and
paramanager.push_high_param(vs_value,left.resultdef,current_procinfo.procdef.proccalloption) then
begin
hightree:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry));
if assigned(hightree) then

11
tests/webtbs/tw21592b.pp Normal file
View File

@ -0,0 +1,11 @@
unit tw21592b;
{$MODE DELPHI}
interface
type TBytesOverlay<T> = array [0..SizeOf(T) - 1] of Byte;
implementation
end.