mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 10:29:21 +02:00
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:
parent
bf9cb352b3
commit
7332a0f801
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12601,6 +12601,7 @@ tests/webtbs/tw21551.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw2158.pp svneol=native#text/plain
|
tests/webtbs/tw2158.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2159.pp svneol=native#text/plain
|
tests/webtbs/tw2159.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw21592.pp svneol=native#text/pascal
|
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/tw21593.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2163.pp svneol=native#text/plain
|
tests/webtbs/tw2163.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw21654.pp svneol=native#text/pascal
|
tests/webtbs/tw21654.pp svneol=native#text/pascal
|
||||||
|
@ -2474,7 +2474,8 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ the constant evaluation of in_sizeof_x happens in pexpr where possible }
|
{ the constant evaluation of in_sizeof_x happens in pexpr where possible }
|
||||||
set_varstate(left,vs_read,[]);
|
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
|
begin
|
||||||
hightree:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry));
|
hightree:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry));
|
||||||
if assigned(hightree) then
|
if assigned(hightree) then
|
||||||
|
11
tests/webtbs/tw21592b.pp
Normal file
11
tests/webtbs/tw21592b.pp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
unit tw21592b;
|
||||||
|
|
||||||
|
{$MODE DELPHI}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
type TBytesOverlay<T> = array [0..SizeOf(T) - 1] of Byte;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user