diff --git a/src/Niecza/Actions.pm b/src/Niecza/Actions.pm index a235f8aa..0ae24793 100644 --- a/src/Niecza/Actions.pm +++ b/src/Niecza/Actions.pm @@ -1349,6 +1349,10 @@ sub POSTFIX { my ($cl, $M) = @_; ppath => $op->{path}, name => $op->{name}, args => $op->{args} // []); + } elsif ($op->{ref}) { # $obj.&foo + $M->{_ast} = Op::CallSub->new(node($M), + invocant => $op->{ref}, + args => [ $arg, @{ $op->{args} // [] } ]); } elsif ($op->{postcall}) { if (@{ $op->{postcall} } > 1) { $M->sorry("Slicels NYI"); @@ -1366,6 +1370,7 @@ sub POSTFIX { my ($cl, $M) = @_; } } else { say join(" ", %$M); + say(YAML::XS::Dump($op)); $M->sorry("Unhandled postop type"); } $M->{_ast} = $cl->whatever_postcheck($M, $st, $M->{_ast}); diff --git a/test2.pl b/test2.pl index 2dec9ded..99c5be82 100644 --- a/test2.pl +++ b/test2.pl @@ -11,6 +11,8 @@ my $f = Any; $f andthen= 4; is $f, Any, 'andthen= works (U)'; my $g = 0; $g //= 4; is $g, 0, '//= works (D)'; my $h = Any; $h //= 4; is $h, 4, '//= works (U)'; + + is 2.¬, False, '.& notation works'; } {