mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-24 11:09:15 +02:00
* fixed some issue with the inputpointer when specializing generics
git-svn-id: trunk@5122 -
This commit is contained in:
parent
a3a650ee73
commit
5cb1af6e2a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7566,6 +7566,7 @@ tests/webtbs/tw7329.pp svneol=native#text/plain
|
||||
tests/webtbs/tw7372.pp svneol=native#text/plain
|
||||
tests/webtbs/tw7379.pp svneol=native#text/plain
|
||||
tests/webtbs/tw7391.pp svneol=native#text/plain
|
||||
tests/webtbs/tw7422.pp svneol=native#text/plain
|
||||
tests/webtbs/tw7425.pp svneol=native#text/plain
|
||||
tests/webtbs/tw7440.pp svneol=native#text/plain
|
||||
tests/webtbs/tw7446.pp svneol=native#text/plain
|
||||
|
@ -1916,7 +1916,8 @@ In case not, the value returned can be arbitrary.
|
||||
if token in [_CWCHAR,_CWSTRING,_CCHAR,_CSTRING,_INTCONST,_REALNUMBER,_ID] then
|
||||
internalerror(200511178);
|
||||
replaysavetoken:=token;
|
||||
dec(inputpointer);
|
||||
if assigned(inputpointer) then
|
||||
dec(inputpointer);
|
||||
{ install buffer }
|
||||
replaytokenbuf:=buf;
|
||||
|
||||
@ -1937,8 +1938,11 @@ In case not, the value returned can be arbitrary.
|
||||
if replaytokenbuf.pos>=replaytokenbuf.size then
|
||||
begin
|
||||
replaytokenbuf:=nil;
|
||||
c:=inputpointer^;
|
||||
inc(inputpointer);
|
||||
if assigned(inputpointer) then
|
||||
begin
|
||||
c:=inputpointer^;
|
||||
inc(inputpointer);
|
||||
end;
|
||||
token:=replaysavetoken;
|
||||
exit;
|
||||
end;
|
||||
|
19
tests/webtbs/tw7422.pp
Normal file
19
tests/webtbs/tw7422.pp
Normal file
@ -0,0 +1,19 @@
|
||||
{$mode objfpc}
|
||||
type generic PListNode<_T> = ^specialize TListNode;
|
||||
generic TListNode<_T> = class(TObject)
|
||||
Data: _T;
|
||||
Next,Prev: PListNode;
|
||||
end;
|
||||
generic TList<_T> = class(TObject)
|
||||
First,Last: PListNode;
|
||||
procedure add(item: _T);
|
||||
end;
|
||||
|
||||
procedure TList.add(item: _T);
|
||||
begin
|
||||
end;
|
||||
|
||||
type TMyList = specialize TList<real>;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user