Inheritance/Single: Difference between revisions
Content deleted Content added
Complete D entry |
→{{header|Perl 6}}: update to modern meaning of .^parents |
||
Line 876:
=={{header|Perl 6}}==
{{works with|Rakudo
<lang perl6>class Animal {}
class Dog is Animal {}
Line 885:
say ~Collie.^parents; # undefined type object
say ~Collie.new.^parents; # instantiated object</lang>
{{out}}
The <tt>.^parents</tt> notation indicates a method call to the object's metaobject rather than to the object itself.
▲Dog() Animal() Any() Mu()<br>
▲Dog() Animal() Any() Mu()
=={{header|PHP}}==
|