Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: 0e87955cfc1c309e6c0ceae99c5a25f761c08e96 https://github.com/Perl/perl5/commit/0e87955cfc1c309e6c0ceae99c5a25f761c08e96 Author: Lukas Mai <lukasmai....@gmail.com> Date: 2025-08-04 (Mon, 04 Aug 2025)
Changed paths: M perly.act M perly.h M perly.tab M perly.y M t/lib/croak/toke M t/op/anonsub.t M toke.c Log Message: ----------- move "illegal anon sub" error from toke.c to perly.y This fixes the TODO test in t/op/anonsub.t, but breaks two other tests: - t/op/anonsub.t not ok 12 - '{ $x = sub }' is illegal # Failed test 12 - '{ $x = sub }' is illegal at t/op/anonsub.t line 15 # got 'Global symbol \"$x\" requires explicit package name (did you forget to declare \"my $x\"?) at (eval 12) line 1, <DATA> line 87.\nIllegal declaration of anonymous subroutine at (eval 12) line 1, at EOF\n' # expected /(?^:^Illegal declaration of anonymous subroutine at)/ - t/lib/croak.t FILE: lib/croak/toke ; line 644 PROG: no feature 'apostrophe_as_package_separator'; sub 'Hello'_he_said (_); EXPECTED: Illegal declaration of anonymous subroutine at - line 2. EXIT STATUS: != 0 GOT: Bareword found where operator expected (Missing operator before "_he_said"?) at - line 2, near "'Hello'_he_said" Illegal declaration of anonymous subroutine at - line 2, near "sub 'Hello'" Execution of - aborted due to compilation errors. EXIT STATUS: 255 not ok 247 - tick in names: initial character of sub name (no feature) # Failed test 247 - tick in names: initial character of sub name (no feature) at lib/croak/toke line 644 Since we don't immediately error out from the lexer anymore, the parser may accumulate more errors before failing with "Illegal declaration of anonymous subroutine". The tests have been changed to accomodate the new diagnostics. Fixes #5959. Commit: fd80e1a7534b5b1dca31c3a28b4ffeb156f12062 https://github.com/Perl/perl5/commit/fd80e1a7534b5b1dca31c3a28b4ffeb156f12062 Author: Lukas Mai <lukasmai....@gmail.com> Date: 2025-08-04 (Mon, 04 Aug 2025) Changed paths: M t/op/anonsub.t Log Message: ----------- t/op/anonsub.t: un-TODO test 14 It now passes. Compare: https://github.com/Perl/perl5/compare/aa1c6e98da54...fd80e1a7534b To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications