Created
July 2, 2010 02:48
-
-
Save ShimmerFairy/460851 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Error (invoked during make): | |
/home/lue/rakudo/parrot_install/bin/parrot perl6.pbc --target=pir --output=Test.pir Test.pm | |
Method 'set_candidates' not found for invocant of class 'MultiSub' | |
current instr.: '' pc 306226 (src/gen/perl6-actions.pir:20664) (CORE.setting:0) | |
called from Sub 'perl6;Perl6;Compiler;main' pc 290826 (src/gen/perl6-actions.pir:15425) | |
... call repeated 1 times | |
make: *** [Test.pir] Error 1 | |
The file, builtins/bind.pir (Not part of rakudo (yet)) | |
=head1 NAME | |
src/builtins/bind.pir -- binding operators | |
=cut | |
.namespace [] | |
.sub '&infix:<:=>' :multi(_,_) | |
.param pmc target | |
.param pmc source | |
target_loop: | |
# If it isn't rw, then die! | |
.local pmc rw | |
rw = getprop 'rw', target | |
unless null rw goto canwrite | |
'&die'('Cannot bind to readonly value') | |
canwrite: | |
$P0 = getprop 'scalar', target | |
unless null $P0 goto scalar_store | |
$I0 = can target, '!STORE' | |
if $I0 goto cont_store | |
#in case of legacy code | |
$I0 = isa target, ['ObjectRef'] | |
unless $I0 goto cont_store | |
setprop target, 'scalar', target | |
scalar_store: | |
#typecheck! | |
.local pmc type | |
type = getprop 'type', target | |
if null type goto type_ok | |
$P0 = type.'ACCEPTS'(source) | |
if $P0 goto type_ok | |
'&die'('The type check has failed.') | |
cont_store: | |
'&die'('Container binding NYI.') | |
type_ok: | |
#Let's bind! | |
$P0 = new ['ObjectRef'], source | |
copy target, $P0 | |
.return (target) | |
.end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment