Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.5.6
-
Fix Version/s: 0.6
-
Component/s: Runtime (Boo.Lang)
-
Labels:None
-
Number of attachments :
Description
Test attached, contents inline:
"""hello, world!"""
class test:
def foo():
(self as duck).bar()
protected def bar():
print 'hello, world!'
t = test()
t.foo()
Even though "bar" is visible to test, casting the current class to duck makes bar inaccessible.
Add "BindingFlags.NonPublic" to the DefaultBindingFlags field in src/boo.lang/runtime/runtimeservices.cs and your sample will work.
I'll leave it up to Rodrigo and others though to decide if this should be added or not. It means you can invoke private or protected methods on objects. But hey, if system.reflection allows it...