Skip to content

Commit

Permalink
Fix attribute defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Aug 27, 2012
1 parent e1d9225 commit 6889a72
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/NQPQ/Actions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -744,9 +744,12 @@ class NQP::Actions is HLL::Actions {
%obj_args<type> := $*W.find_sym([~$<typename>[0]]);
}
if $sigil eq '$' || $sigil eq '&' {
%obj_args<default> := $<typename>
?? %obj_args<type>
!! default_for('$');
if $<typename> {
%obj_args<default> := %obj_args<type>;
}
else {
try %obj_args<default> := $*W.find_sym(['NQPMu']);
}
}

# Add it.
Expand Down

0 comments on commit 6889a72

Please sign in to comment.