Skip to content

Conversation

mauke
Copy link
Contributor

@mauke mauke commented Oct 5, 2025

Like return, goto is exempt from the "if it looks like a function, it is parsed like a function" rule, so goto ($foo) . $bar parses as goto $foo . $bar. Previously, there had been no test for this special case.

Fixes #23806.

(Also, remove trailing whitespace from test file.)

This is an alternative to PR #23814.


  • This set of changes does not require a perldelta entry.

Like 'return', 'goto' is exempt from the "if it looks like a function,
it is parsed like a function" rule, so 'goto ($foo) . $bar' parses as
'goto $foo . $bar'. Previously, there had been no test for this special
case.

Fixes Perl#23806.

(Also, remove trailing whitespace from test file.)
@jkeenan jkeenan merged commit c6eefb2 into Perl:blead Oct 6, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lack tests for "goto EXPR exempt from "looks-like-a-function" rule

2 participants