Author: pmichaud
Date: Thu Jan 8 16:27:15 2009
New Revision: 35232
Modified:
branches/rvar2/languages/perl6/src/builtins/assign.pir
Log:
[rakudo]: If we copy a sub, make sure its $!signature property follows.
It might be better at some point to have a way associate signatures
with Subs by something other than properties.
Modified: branches/rvar2/languages/perl6/src/builtins/assign.pir
==============================================================================
--- branches/rvar2/languages/perl6/src/builtins/assign.pir (original)
+++ branches/rvar2/languages/perl6/src/builtins/assign.pir Thu Jan 8
16:27:15 2009
@@ -34,9 +34,14 @@
if $I0 goto do_assign
'die'("Type mismatch in assignment.")
do_assign:
- eq_addr cont, source, skip_copy
+ eq_addr cont, source, assign_done
copy cont, source
- skip_copy:
+ # We need to copy over any $!signature property on sub objects
+ $I0 = isa source, 'Sub'
+ unless $I0 goto assign_done
+ $P0 = getprop '$!signature', source
+ setprop cont, '$!signature', $P0
+ assign_done:
.return (cont)
.end