* fixed some issue with the inputpointer when specializing generics

git-svn-id: trunk@5122 -
This commit is contained in:
florian 2006-10-31 13:30:57 +00:00
parent a3a650ee73
commit 5cb1af6e2a
3 changed files with 27 additions and 3 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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
View 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.