Permalink
Browse files

Remove a check that led to bogus errors.

Of note, this forbade `unit sub MAIN($x where { $x > 1 }); ...` - that
is, any use of a `where` in a blockless sub MAIN. After some fiddling,
I couldn't work out what useful purpose it served, and no spectests
become unhappy as a result of removing it, so I'll consider it a
thinko.
  • Loading branch information...
1 parent b519088 commit 86843a3fdb3a75a7aaf23eb51b2bfa0c3bbacddf @jnthn jnthn committed Jul 21, 2016
Showing with 0 additions and 1 deletion.
  1. +0 −1 src/Perl6/Grammar.nqp
@@ -2582,7 +2582,6 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
[
|| ';'
{
- $/.CURSOR.missing_block() if $*BORG<block>;
if $<deflongname> ne 'MAIN' {
$/.CURSOR.typed_panic("X::UnitScope::Invalid", what => "sub", where => "except on a MAIN sub");
}

0 comments on commit 86843a3

Please sign in to comment.