use v6; use Test; plan 3; #L class test { method foo($a:) { 'method' } }; sub foo($a) { 'sub' }; my $obj = test.new; is foo($obj:), 'method', 'method with colon notation'; is $obj.foo, 'method', 'method with dot notation'; is foo($obj), 'sub', 'adding trailing comma should call the "sub"';