mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 06:09:11 +02:00
* not ignoring private/protected anymore, fixes bug #3969
git-svn-id: trunk@553 -
This commit is contained in:
parent
833a6d40d4
commit
bdc8b7d061
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -5474,6 +5474,8 @@ tests/webtbf/tw3738.pp svneol=native#text/plain
|
|||||||
tests/webtbf/tw3740.pp svneol=native#text/plain
|
tests/webtbf/tw3740.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw3790.pp svneol=native#text/plain
|
tests/webtbf/tw3790.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw3841.pp svneol=native#text/plain
|
tests/webtbf/tw3841.pp svneol=native#text/plain
|
||||||
|
tests/webtbf/tw3969.pp svneol=native#text/plain
|
||||||
|
tests/webtbf/tw3969u.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw4103.pp svneol=native#text/plain
|
tests/webtbf/tw4103.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw4111.pp svneol=native#text/plain
|
tests/webtbf/tw4111.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw4139.pp svneol=native#text/plain
|
tests/webtbf/tw4139.pp svneol=native#text/plain
|
||||||
|
@ -1941,8 +1941,10 @@ implementation
|
|||||||
begin
|
begin
|
||||||
sym:=tsym(classh.symtable.speedsearch(s,speedvalue));
|
sym:=tsym(classh.symtable.speedsearch(s,speedvalue));
|
||||||
if assigned(sym) and
|
if assigned(sym) and
|
||||||
Tsym(sym).is_visible_for_object(topclassh,current_procinfo.procdef._class) then
|
tsym(sym).is_visible_for_object(topclassh,current_procinfo.procdef._class) then
|
||||||
break;
|
break
|
||||||
|
else
|
||||||
|
sym:=nil;
|
||||||
classh:=classh.childof;
|
classh:=classh.childof;
|
||||||
end;
|
end;
|
||||||
searchsym_in_class:=sym;
|
searchsym_in_class:=sym;
|
||||||
|
@ -479,7 +479,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function Tsym.is_visible_for_object(currobjdef:Tdef;context : tdef):boolean;
|
function tsym.is_visible_for_object(currobjdef:Tdef;context : tdef):boolean;
|
||||||
begin
|
begin
|
||||||
is_visible_for_object:=false;
|
is_visible_for_object:=false;
|
||||||
|
|
||||||
|
17
tests/webtbf/tw3969.pp
Normal file
17
tests/webtbf/tw3969.pp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ %fail }
|
||||||
|
{$Mode Delphi}
|
||||||
|
{$R-,X+,V-}
|
||||||
|
uses crt, tw3969u;
|
||||||
|
|
||||||
|
var
|
||||||
|
myobj: testobj;
|
||||||
|
|
||||||
|
begin
|
||||||
|
clrscr;
|
||||||
|
myobj.init;
|
||||||
|
writeln(myobj.getvar);
|
||||||
|
myobj.setvar('antonio');
|
||||||
|
myobj.myvar := 'pippo';
|
||||||
|
writeln(myobj.myvar);
|
||||||
|
myobj.done;
|
||||||
|
end.
|
41
tests/webtbf/tw3969u.pp
Normal file
41
tests/webtbf/tw3969u.pp
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{$Mode Delphi}
|
||||||
|
{$R-,X+,V-}
|
||||||
|
|
||||||
|
unit tw3969u;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
type testobj = object
|
||||||
|
constructor init;
|
||||||
|
destructor done;
|
||||||
|
procedure setvar(value: string);
|
||||||
|
function getvar: string;
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
myvar: string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
constructor testobj.init;
|
||||||
|
begin
|
||||||
|
myvar := 'init';
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor testobj.done;
|
||||||
|
begin
|
||||||
|
myvar := 'done';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure testobj.setvar;
|
||||||
|
begin
|
||||||
|
myvar := value;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function testobj.getvar : string;
|
||||||
|
begin
|
||||||
|
result := myvar;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user