fixed the problem with 'using' and protected mebers. now it seems to be safe to generate the protected members as protected again. all the test are running and the director_protected_runme.rb now test for the right access control
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5526 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
66ae9df8b1
commit
f7e02f46fc
3 changed files with 33 additions and 22 deletions
|
|
@ -9,13 +9,26 @@ class FooBar < Director_protected::Bar
|
|||
end
|
||||
end
|
||||
|
||||
class Hello < FooBar
|
||||
public
|
||||
def pang
|
||||
ping
|
||||
end
|
||||
end
|
||||
|
||||
b = Director_protected::Bar.new
|
||||
fb = FooBar.new
|
||||
|
||||
p = 0
|
||||
begin
|
||||
fb.ping
|
||||
b.ping
|
||||
p = 1
|
||||
rescue NoProtectedError
|
||||
end
|
||||
|
||||
h = Hello.new
|
||||
|
||||
raise RuntimeError if p == 1
|
||||
raise RuntimeError if b.pong != "Bar::pong();Foo::pong();Bar::ping();"
|
||||
raise RuntimeError if fb.pong != "Bar::pong();Foo::pong();FooBar::ping();"
|
||||
raise RuntimeError if h.pang != "FooBar::ping();"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue