* store/restore trttinode.rttidatatype to/from ppu file, and also copy it in

rttidatatype.getcopy (fixes mantis #15207)

git-svn-id: trunk@14318 -
This commit is contained in:
Jonas Maebe 2009-12-03 23:03:25 +00:00
parent d1538ab023
commit 280f27b45c
4 changed files with 32 additions and 1 deletions

1
.gitattributes vendored
View File

@ -10102,6 +10102,7 @@ tests/webtbs/tw14958b.pp svneol=native#text/plain
tests/webtbs/tw1501.pp svneol=native#text/plain
tests/webtbs/tw15088.pp svneol=native#text/plain
tests/webtbs/tw15169.pp svneol=native#text/plain
tests/webtbs/tw15207.pp svneol=native#text/plain
tests/webtbs/tw1532.pp svneol=native#text/plain
tests/webtbs/tw1539.pp svneol=native#text/plain
tests/webtbs/tw1567.pp svneol=native#text/plain

View File

@ -1104,6 +1104,7 @@ implementation
inherited ppuload(t,ppufile);
ppufile.getderef(rttidefderef);
rttitype:=trttitype(ppufile.getbyte);
rttidatatype:=trttidatatype(ppufile.getbyte);
end;
@ -1112,6 +1113,7 @@ implementation
inherited ppuwrite(ppufile);
ppufile.putderef(rttidefderef);
ppufile.putbyte(byte(rttitype));
ppufile.putbyte(byte(rttidatatype));
end;
@ -1136,6 +1138,7 @@ implementation
n:=trttinode(inherited dogetcopy);
n.rttidef:=rttidef;
n.rttitype:=rttitype;
n.rttidatatype:=rttidatatype;
result:=n;
end;

View File

@ -43,7 +43,7 @@ type
{$endif Test_Double_checksum}
const
CurrentPPUVersion = 105;
CurrentPPUVersion = 106;
{ buffer sizes }
maxentrysize = 1024;

27
tests/webtbs/tw15207.pp Normal file
View File

@ -0,0 +1,27 @@
program testinline;
{$mode objfpc}{$H+}
type
enumtest = (e1, e2);
function Test: Boolean; inline;
var
e: enumtest;
s: String;
begin
e := e1;
WriteStr(s, e);
result:=s='e1';
end;
procedure TestProc;
begin
if not Test then
halt(1);
end;
begin
TestProc;
end.