* patch by Sven Barth, handle idtoken correctly in the token recorder, resolves #19277

git-svn-id: trunk@17506 -
This commit is contained in:
florian 2011-05-19 19:31:08 +00:00
parent d5e6d79b06
commit 41c18adaf4
4 changed files with 19 additions and 3 deletions

1
.gitattributes vendored
View File

@ -11496,6 +11496,7 @@ tests/webtbs/tw1917.pp svneol=native#text/plain
tests/webtbs/tw1920.pp svneol=native#text/plain
tests/webtbs/tw19201.pp svneol=native#text/pascal
tests/webtbs/tw1923.pp svneol=native#text/plain
tests/webtbs/tw19277.pp svneol=native#text/pascal
tests/webtbs/tw1930.pp svneol=native#text/plain
tests/webtbs/tw1931.pp svneol=native#text/plain
tests/webtbs/tw1932.pp svneol=native#text/plain

View File

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

View File

@ -2104,7 +2104,7 @@ In case not, the value returned can be arbitrary.
end;
recordtokenbuf.write(token,SizeOf(token));
if token=_ID then
if token<>_GENERICSPECIALTOKEN then
recordtokenbuf.write(idtoken,SizeOf(idtoken));
case token of
_CWCHAR,
@ -2185,7 +2185,7 @@ In case not, the value returned can be arbitrary.
repeat
{ load token from the buffer }
replaytokenbuf.read(token,SizeOf(token));
if token=_ID then
if token<>_GENERICSPECIALTOKEN then
replaytokenbuf.read(idtoken,SizeOf(idtoken))
else
idtoken:=_NOID;

15
tests/webtbs/tw19277.pp Normal file
View File

@ -0,0 +1,15 @@
program TNP;
{$mode objfpc}{$H+}
{$modeswitch nestedprocvars}
type
generic GenericA<T>=class
private
type
TIteratorfunction = procedure (const x:T) is nested;
// Fatal: Syntax error, ";" expected but "is" found
var private
end;
TSpec=specialize GenericA<integer>;
begin
end.