We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e417703 commit 341b6d5Copy full SHA for 341b6d5
src/NQP/Actions.pm
@@ -1026,7 +1026,14 @@ class NQP::Actions is HLL::Actions {
1026
1027
# Set the type of the parameter.
1028
if $<typename> {
1029
- $past.returns($<typename>[0].ast.value);
+ my $type := $<typename>[0].ast.value;
1030
+ $past.returns($type);
1031
+ if pir::repr_get_primitive_type_spec__IP($type) -> $prim {
1032
+ $*W.cur_lexpad().symbol($past.name, :type($type));
1033
+ if $past.default && !$<default_value> {
1034
+ $past.default(default_value_for_prim($prim));
1035
+ }
1036
1037
}
1038
1039
# Set definedness flag (XXX want a better way to do this).
0 commit comments