Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion t/op/goto.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BEGIN {
use warnings;
use strict;
use Config;
plan tests => 96;
plan tests => 97;

our $TODO;

Expand Down Expand Up @@ -691,3 +691,17 @@ is $@,'', 'goto the first parameter of a binary expression [perl #132854]';
GH23806skip:
is $x, "good", "goto EXPR exempt from 'looks like a function' rule";
}

# [GH #23810]
{
local $@;
eval {
goto GH23810;
if (0) {
GH23810: ;
}
};
like($@, qr/^Can't find label GH23810/,
"goto LABEL can't be used to go into a construct that is optimized away");
}

Loading