mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 15:47:53 +02:00
* patch by Sven Barth, handle idtoken correctly in the token recorder, resolves #19277
git-svn-id: trunk@17506 -
This commit is contained in:
parent
d5e6d79b06
commit
41c18adaf4
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -43,7 +43,7 @@ type
|
||||
{$endif Test_Double_checksum}
|
||||
|
||||
const
|
||||
CurrentPPUVersion = 128;
|
||||
CurrentPPUVersion = 129;
|
||||
|
||||
{ buffer sizes }
|
||||
maxentrysize = 1024;
|
||||
|
@ -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
15
tests/webtbs/tw19277.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user