Short answer: yes.

Long answer: a type object such as "A" is considered to be something
of an "empty instance" of its own type in Rakudo. That way, you can
use them as "real instances" in many ways, except that they are
undefined and you're not allowed to do anything with any attributes.

// Carl

On Wed, Oct 5, 2011 at 3:40 AM, Mark J. Reed <markjr...@gmail.com> wrote:
> In 'A.foo', is the invocant really "of class A"?  I mean, given that it *is*
> class A...
>
> On Tuesday, October 4, 2011, Will Coleda via RT <
> perl6-bugs-follo...@perl.org> wrote:
>> On Fri Aug 13 13:15:01 2010, lithos wrote:
>>> Hi!
>>>
>>> The class name is missing in the error message:
>>>
>>> $ ./perl6 -e 'class A {}; A.foo'
>>> Method 'foo' not found for invocant of class ''
>>>   in main program body at line 1
>>>
>>> $ ./perl6 -e 'Any.foo'
>>> Method 'foo' not found for invocant of class ''
>>>   in main program body at line 1
>>>
>>> $ ./perl6 --version
>>>
>>> This is Rakudo Perl 6, version 2010.07-113-gc41bcd7 built on parrot
>>> 2.6.0 r48341
>>
>> fixed:
>>
>> $ perl6 -e 'class A {}; A.foo'
>> Method 'foo' not found for invocant of class 'A'
>>
>> $ perl6 -e 'Any.foo'
>> Method 'foo' not found for invocant of class 'Any'
>>
>> $ perl6 --version
>> This is perl6 version 2011.09-35-g545638a built on parrot 3.8.0 revision
> RELEASE_3_8_0-
>> 120-gb7e7400
>>
>>
>> closable with tests.
>>
>> --
>> Will "Coke" Coleda
>>
>
> --
> Mark J. Reed <markjr...@gmail.com>
>

Reply via email to