diff --git a/lib/_007/Parser/Syntax.pm b/lib/_007/Parser/Syntax.pm index 701a7de1..f6fa19ba 100644 --- a/lib/_007/Parser/Syntax.pm +++ b/lib/_007/Parser/Syntax.pm @@ -223,7 +223,7 @@ grammar _007::Parser::Syntax { } token term:object { [new» <.ws> - [ ) ~~ Val::Type }> <.ws>]? + ) ~~ Val::Type }> <.ws> ]? '{' ~ '}' } diff --git a/t/features/objects.t b/t/features/objects.t index 3ec506fb..22cda14c 100644 --- a/t/features/objects.t +++ b/t/features/objects.t @@ -225,20 +225,6 @@ use _007::Test; parses-to $program, $ast, "a `return` inside of a (short-form) method is fine"; } -{ - my $program = q:to/./; - my o1 = { name: "James" }; - my o2 = new { name: "James" }; - - say(o1 == o2); - . - - outputs - $program, - qq[True\n], - "`new` on object literals without the type is allowed but optional"; -} - { my $program = q:to/./; f();