Skip to content

Commit

Permalink
Make self available in initializer thunks, fixes #93
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed May 21, 2012
1 parent a900903 commit 5192417
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Kernel.cs
Expand Up @@ -5356,7 +5356,7 @@ internal class MMDCandidate : MultiCandidate {
} else {
P6any init = prog[i].init;
th.lexi0 = i;
return init.Invoke(th, Variable.None, null);
return init.Invoke(th, new [] { NewROScalar(n) }, null);
}

value: vx = (Variable) th.resultSlot;
Expand Down
2 changes: 1 addition & 1 deletion src/NieczaActions.pm6
Expand Up @@ -2792,7 +2792,7 @@ method do_initialize($/, $parcel?) {
$ll]) });
}
elsif $lhs.^isa($OpAttribute) {
my $init = self.thunk_sub($rhs,
my $init = self.thunk_sub($rhs, :params(['self']),
:name($lhs.initializer.name ~ " init"));
$init.set_outervar(my $ov = self.gensym);
$*CURLEX<!sub>.add_my_sub($ov, $init);
Expand Down

0 comments on commit 5192417

Please sign in to comment.