+ proper init rtti for proc. vars

git-svn-id: trunk@1479 -
This commit is contained in:
florian 2005-10-18 20:05:56 +00:00
parent 75c00e21c9
commit 7be36096f0
4 changed files with 28 additions and 0 deletions

1
.gitattributes vendored
View File

@ -6309,6 +6309,7 @@ tests/webtbs/tw4223.pp svneol=native#text/plain
tests/webtbs/tw4233.pp svneol=native#text/plain
tests/webtbs/tw4234.pp svneol=native#text/plain
tests/webtbs/tw4234a.pp svneol=native#text/plain
tests/webtbs/tw4239.pp svneol=native#text/plain
tests/webtbs/tw4240.pp svneol=native#text/plain
tests/webtbs/tw4247.pp svneol=native#text/plain
tests/webtbs/tw4253.pp svneol=native#text/plain

View File

@ -65,6 +65,7 @@ const
tkA16string = 23;
tkA64string = 24;
{$endif}
tkprocvar = 25;
otSByte = 0;
otUByte = 1;

View File

@ -4120,6 +4120,11 @@ implementation
{ write name of result type }
tstoreddef(rettype.def).write_rtti_name;
end
else
begin
asmlist[al_rtti].concat(Tai_const.Create_8bit(tkprocvar));
write_rtti_name;
end;
end;

21
tests/webtbs/tw4239.pp Normal file
View File

@ -0,0 +1,21 @@
{ Source provided for Free Pascal Bug Report 4239 }
{ Submitted by "Lars" on 2005-07-30 }
{ e-mail: L@z505.com }
program Project1;
{$mode objfpc}{$H+}
var
MyProc: array of procedure(s:string);
procedure testing(s:string);
begin
writeln(s);
end;
begin
setlength(myproc,1);
MyProc[0]:=@testing;
MyProc[0]('Test me');
readln; //watch for error on close
end.