Skip to content

Commit

Permalink
Make optional coercive parameter work again
Browse files Browse the repository at this point in the history
It must default to coercion target type.

Fixes #4092
  • Loading branch information
vrurg committed Dec 6, 2020
1 parent c4c4ba9 commit 44cc88b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Actions.nqp
Expand Up @@ -9464,7 +9464,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
# fixed because it'd take more than worth it considering the upcoming RakuAST. //vrurg
$var.default(
QAST::WVal.new( :value($is_coercive
?? $param_type.HOW.constraint_type($param_type)
?? $param_type.HOW.target_type($param_type)
!! $nomtype)));
}
}
Expand Down

0 comments on commit 44cc88b

Please sign in to comment.