mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 17:09:09 +02:00
parent
cf36646238
commit
d167f338a7
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10391,6 +10391,7 @@ tests/webtbs/tw15296.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15304.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15308.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1532.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15357.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15363.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15364.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15370.pp svneol=native#text/plain
|
||||
|
37
tests/webtbs/tw15357.pp
Normal file
37
tests/webtbs/tw15357.pp
Normal file
@ -0,0 +1,37 @@
|
||||
type
|
||||
TType = packed record
|
||||
a: byte;
|
||||
b: byte;
|
||||
c: longword;
|
||||
end;
|
||||
|
||||
ttypecontainer = packed record
|
||||
r: ttype;
|
||||
b1,b2: byte;
|
||||
end;
|
||||
|
||||
function make: TType;
|
||||
begin
|
||||
make.a:=1;
|
||||
make.b:=2;
|
||||
make.c:=$12345678;
|
||||
end;
|
||||
|
||||
var
|
||||
id: ttypecontainer;
|
||||
begin
|
||||
id.b1:=123;
|
||||
id.b2:=234;
|
||||
id.r := make();
|
||||
if id.r.a<>1 then
|
||||
halt(1);
|
||||
if id.r.b<>2 then
|
||||
halt(2);
|
||||
if id.r.c<>$12345678 then
|
||||
halt(3);
|
||||
if id.b1<>123 then
|
||||
halt(4);
|
||||
if id.b2<>234 then
|
||||
halt(5);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user