* fixed issue with static fields

git-svn-id: trunk@1803 -
This commit is contained in:
florian 2005-11-22 22:08:11 +00:00
parent 350c886460
commit aa22e57a7e
4 changed files with 41 additions and 3 deletions

2
.gitattributes vendored
View File

@ -5670,6 +5670,7 @@ tests/webtbf/tw4244.pp svneol=native#text/plain
tests/webtbf/tw4256.pp svneol=native#text/plain
tests/webtbf/tw4359.pp svneol=native#text/plain
tests/webtbf/tw4445.pp svneol=native#text/plain
tests/webtbf/tw4529.pp svneol=native#text/plain
tests/webtbf/uw0744.pp svneol=native#text/plain
tests/webtbf/uw0840a.pp svneol=native#text/plain
tests/webtbf/uw0840b.pp svneol=native#text/plain
@ -6372,6 +6373,7 @@ tests/webtbs/tw4477.pp svneol=native#text/plain
tests/webtbs/tw4487.pp -text svneol=unset#text/plain
tests/webtbs/tw4489.pp -text svneol=unset#text/plain
tests/webtbs/tw4496.pp svneol=native#text/plain
tests/webtbs/tw4529.pp -text svneol=unset#text/plain
tests/webtbs/tw4537.pp svneol=native#text/plain
tests/webtbs/ub1873.pp svneol=native#text/plain
tests/webtbs/ub1883.pp svneol=native#text/plain

View File

@ -1150,11 +1150,8 @@ implementation
(cs_static_keyword in aktmoduleswitches) and (idtoken=_STATIC) then
begin
include(current_object_option,sp_static);
insert_syms(sc,tt,false,dummysymoptions);
exclude(current_object_option,sp_static);
consume(_STATIC);
consume(_SEMICOLON);
symdone:=true;
end;
{ insert it in the symtable, if not done yet }

19
tests/webtbf/tw4529.pp Normal file
View File

@ -0,0 +1,19 @@
{ %FAIL }
{ Source provided for Free Pascal Bug Report 4529 }
{ Submitted by "Vincent Snijders" on 2005-11-20 }
{ e-mail: vsnijders@quicknet.nl }
program Project1;
{$mode objfpc}{$H+}{$static on}
uses
Classes
{ add your units here };
type
MyClass = class(TComponent)
FClassVar: integer; static;
end;
begin
end.

20
tests/webtbs/tw4529.pp Normal file
View File

@ -0,0 +1,20 @@
{ Source provided for Free Pascal Bug Report 4529 }
{ Submitted by "Vincent Snijders" on 2005-11-20 }
{ e-mail: vsnijders@quicknet.nl }
program Project1;
{$mode objfpc}{$H+}{$static on}
uses
Classes
{ add your units here };
type
MyClass = class(TComponent)
//private
public
FClassVar: integer; static;
end;
begin
end.