Skip Menu |
Report information
Id: 130478
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: kaare [at] jasonic.dk
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



From: Kaare Rasmussen <kaare [...] jasonic.dk>
To: rakudobug [...] perl.org
Date: Sun, 1 Jan 2017 13:49:12 +0100
Subject: multi doesn't work with 'is native'
Download (untitled) / with headers
text/plain 817b
This works use NativeCall; constant gid_t = uint32; constant group = class :: is repr('CStruct') { has Str $.name; has Str $.password; has gid_t $.gid; has CArray[Str] $.members; }; sub getgrgid(int32) returns group is native { * } my int32 $i = 1; getgrgid($i); This doesn't use NativeCall; constant gid_t = uint32; constant group = class :: is repr('CStruct') { has Str $.name; has Str $.password; has gid_t $.gid; has CArray[Str] $.members; }; multi sub getgrgid(int32) returns group is native { * } multi sub getgrgid(Int) { say 'Hi' } my int32 $i = 1; getgrgid($i); Shouldn't it?
Download (untitled) / with headers
text/plain 1.2k
On Sun, 01 Jan 2017 04:49:38 -0800, kaare@jasonic.dk wrote: Show quoted text
> This works > > use NativeCall; > > constant gid_t = uint32; > constant group = class :: is repr('CStruct') { > has Str $.name; > has Str $.password; > has gid_t $.gid; > has CArray[Str] $.members; > }; > > sub getgrgid(int32) returns group is native { * } > > my int32 $i = 1; > getgrgid($i); > > This doesn't > > use NativeCall; > > constant gid_t = uint32; > constant group = class :: is repr('CStruct') { > has Str $.name; > has Str $.password; > has gid_t $.gid; > has CArray[Str] $.members; > }; > > multi sub getgrgid(int32) returns group is native { * } > multi sub getgrgid(Int) { say 'Hi' } > > my int32 $i = 1; > getgrgid($i); > > Shouldn't it? > >
What does "doesn't work" mean? Please be specific about the problem and include your perl6 --version On my HEAD build the second one fails with Cannot invoke object with invocation handler in this context in sub getgrgid at test.p6 line 11 in block <unit> at test.p6 line 15
Download (untitled) / with headers
text/plain 772b
Show quoted text
> What does "doesn't work" mean? Please be specific about the problem and include your perl6 --version > > On my HEAD build the second one fails with > > Cannot invoke object with invocation handler in this context > in sub getgrgid at test.p6 line 11 > in block <unit> at test.p6 line 15 >
I'm not impressed with the bug tracking. No link provided in the email, and my reply with the follow-up information got lost. Today 15.35 I wrote Perhaps it would be an idea to include the error message: Cannot invoke object with invocation handler in this context in sub getgrgid at b line 11 in block <unit> at b line 15 and the perl6 --version This is Rakudo version 2016.12-118-g3baffe7 built on MoarVM version 2016.12-21-g3dc5647 implementing Perl 6.c.
Subject: Re: [perl #130478] multi doesn't work with 'is native'
Date: Sun, 1 Jan 2017 18:55:36 +0100
To: perl6-bugs-followup [...] perl.org
From: Kaare Rasmussen <kaare [...] jasonic.dk>
Download (untitled) / with headers
text/plain 775b
Show quoted text
> What does "doesn't work" mean? Please be specific about the problem and include your perl6 --version > > On my HEAD build the second one fails with > > Cannot invoke object with invocation handler in this context > in sub getgrgid at test.p6 line 11 > in block <unit> at test.p6 line 15 >
I'm not impressed with the bug tracking. No link provided in the email, and my reply with the follow-up information got lost. Today 15.35 I wrote Perhaps it would be an idea to include the error message: Cannot invoke object with invocation handler in this context in sub getgrgid at b line 11 in block <unit> at b line 15 and the perl6 --version This is Rakudo version 2016.12-118-g3baffe7 built on MoarVM version 2016.12-21-g3dc5647 implementing Perl 6.c.
Date: Sun, 1 Jan 2017 15:35:43 +0100
To: perl6-bugs-followup [...] perl.org
From: Kaare Rasmussen <kaare [...] jasonic.dk>
Subject: Re: [perl #130478] AutoReply: multi doesn't work with 'is native'
Download (untitled) / with headers
text/plain 328b
Perhaps it would be an idea to include the error message: Cannot invoke object with invocation handler in this context in sub getgrgid at b line 11 in block <unit> at b line 15 and the perl6 --version This is Rakudo version 2016.12-118-g3baffe7 built on MoarVM version 2016.12-21-g3dc5647 implementing Perl 6.c.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org