On Mon, 03 Jul 2017 14:16:58 -0700, allber...@gmail.com wrote: > [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") { * }