diff --git a/src/parser/signature.pm b/src/parser/signature.pm index 87d65d0a9aa..2cb8715eb27 100644 --- a/src/parser/signature.pm +++ b/src/parser/signature.pm @@ -45,6 +45,7 @@ method add_invocant() { $param := "self"; $param := 1; $param := 1; + $param := list(); @entries.unshift($param); } } @@ -127,13 +128,14 @@ method ast($high_level?) { # Fix up nominal type. my $sigil := substr($_, 0, 1); - if $_ { - $_ := PAST::Var.new( :name('Object'), :scope('package') ); + if $_ || $_ { + $_ := PAST::Var.new( :name('Object'), :namespace(list()), :scope('package') ); } elsif $sigil eq "$" { if !$_ { $_ := PAST::Var.new( :name(self.get_default_parameter_type()), + :namespace(list()), :scope('package') ); }