*bar::like = *like;
}
no warnings 'deprecated';
-plan 128;
+plan 130;
# -------------------- Errors with feature disabled -------------------- #
}
r(1);
}
+$::TODO = ' ';
+like runperl(
+ switches => [ '-Mfeature=:all' ],
+ prog => 'state sub a { foo ref } a()',
+ stderr => 1
+ ),
+ qr/syntax error/,
+ 'referencing a state sub after a syntax error does not crash';
+undef $::TODO;
# -------------------- my -------------------- #
eval q{ my sub george () { 2 } };
is $w, undef, 'no double free from constant my subs';
}
+$::TODO = ' ';
+like runperl(
+ switches => [ '-Mfeature=:all' ],
+ prog => 'my sub a { foo ref } a()',
+ stderr => 1
+ ),
+ qr/syntax error/,
+ 'referencing a my sub after a syntax error does not crash';
+undef $::TODO;
# -------------------- Interactions (and misc tests) -------------------- #