Carl (>), Darren (>>):
>> I didn't get it to trust me, though:
>>
>> <masak> pugs: class A { has $!foo }; class B { trusts A; method bar(A
>> $a) { say $a!foo } }; B.new.bar(A.new(:bar(42)))
>> <p6eval> pugs: OUTPUT«␤»
>>
>> Either it bitrotted or I'm using it wrong.
>
> You're using it wrong.  You need to put 'trusts B;' in A in order for B to
> see A's privates.  I hope it is obvious why this is the case. -- Darren
> Duncan

Aye, my mistake. Apparently the syntax I used to try to get at the
private attribute would instead have called a private method. So much
for rooting things in the concreteness of an implementation. ;)

// Carl

Reply via email to