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

Owner: Nobody
Requestors: allbery.b [at] gmail.com
Cc:
AdminCc:

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



To: rakudobug [...] perl.org
Subject: [LTA] internal error for invalid native type in "is native"
From: Brandon Allbery <allbery.b [...] gmail.com>
Date: Mon, 3 Jul 2017 17:16:52 -0400
Download (untitled) / with headers
text/plain 993b
[03 21:03:27] <Skarsnik> m: use NativeCall; sub foo(num $a) is native("foo") { * };
[03 21:03:27] <camelia> rakudo-moar a7b230: OUTPUT: «===SORRY!=== Error while compiling <tmp>␤
[03 21:03:27]  Cannot resolve caller infix:<==>(NQPMu, Int); none of these signatures match:␤
[03 21:03:27]      ($?)␤
[03 21:03:27]      (\a, \b)␤
[03 21:03:27]      (Real \a, Real \b)␤
[03 21:03:27]      (Int:D \a, Int:D \b)␤
[03 21:03:27]      (int $a, int $b)␤
[03 21:03:27]      (Num:D \a, Num:D \b …»
[03 21:06:25] <geekosaur> now I think we have an LTA...
[03 21:06:52] <geekosaur> m: use NativeCall; sub foo(num32 $a) is native("foo") { * };
[03 21:06:53] <camelia> rakudo-moar a7b230: ( no output )
[03 21:06:59] <geekosaur> LTA for a bad native type

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
Download (untitled) / with headers
text/plain 1.3k
On Mon, 03 Jul 2017 14:16:58 -0700, allbery.b@gmail.com wrote: Show quoted text
> [03 21:03:27] <Skarsnik> m: use NativeCall; sub foo(num $a) is > native("foo") { * }; > [03 21:03:27] <camelia> rakudo-moar a7b230: OUTPUT: «===SORRY!=== Error > while compiling <tmp>␤ > [03 21:03:27] Cannot resolve caller infix:<==>(NQPMu, Int); none of these > signatures match:␤ > [03 21:03:27] ($?)␤ > [03 21:03:27] (\a, \b)␤ > [03 21:03:27] (Real \a, Real \b)␤ > [03 21:03:27] (Int:D \a, Int:D \b)␤ > [03 21:03:27] (int $a, int $b)␤ > [03 21:03:27] (Num:D \a, Num:D \b …» > [03 21:06:25] <geekosaur> now I think we have an LTA... > [03 21:06:52] <geekosaur> m: use NativeCall; sub foo(num32 $a) is > native("foo") { * }; > [03 21:06:53] <camelia> rakudo-moar a7b230: ( no output ) > [03 21:06:59] <geekosaur> LTA for a bad native type >
Testing with ~ $ perl6 -v This is Rakudo version 2018.02.1-164-g57af8b847 built on MoarVM version 2018.02-171-geee5be412 implementing Perl 6.c. the result looks quite a bit better: ~ $ perl6 -e 'use NativeCall; sub foo(num $a) is native("foo") { * }' Potential difficulties: In 'foo' routine declaration - Not an accepted NativeCall type for parameter [1] $a : num --> For Numerical type, use the appropriate int32/int64/num64... at -e:1 ------> use NativeCall; sub foo(num $a) ⏏is native("foo") { * }


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