# New Ticket Created by Kaare Rasmussen
# Please include the string: [perl #130478]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=130478 >
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?