In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/7122d783e33c1d4b9b5a037eef231fae4c2d76cd?hp=76dacd2ed6a27ae362c4ea85efa696977916a58f>
- Log ----------------------------------------------------------------- commit 7122d783e33c1d4b9b5a037eef231fae4c2d76cd Author: Tony Cook <t...@develop-help.com> Date: Wed Jan 2 11:20:34 2019 +1100 [perl #133524] report line number for Prototype not terminated Previously COPLINE was updated (to the end of the file) before reporting the error, which wasn't useful. ----------------------------------------------------------------------- Summary of changes: t/lib/croak/toke | 6 ++++++ toke.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/t/lib/croak/toke b/t/lib/croak/toke index 4a01c7adab..59c377ba6b 100644 --- a/t/lib/croak/toke +++ b/t/lib/croak/toke @@ -487,3 +487,9 @@ dump; CORE::dump; EXPECT dump() must be written as CORE::dump() as of Perl 5.30 at - line 2. +######## +# NAME check Prototype not terminated includes line number (133524) +sub t1 {} +sub t2 (} +EXPECT +Prototype not terminated at - line 2. diff --git a/toke.c b/toke.c index 0527bd810a..844de04a23 100644 --- a/toke.c +++ b/toke.c @@ -8738,9 +8738,9 @@ Perl_yylex(pTHX) /* Look for a prototype */ if (*s == '(' && !is_sigsub) { s = scan_str(s,FALSE,FALSE,FALSE,NULL); - COPLINE_SET_FROM_MULTI_END; if (!s) Perl_croak(aTHX_ "Prototype not terminated"); + COPLINE_SET_FROM_MULTI_END; (void)validate_proto(PL_subname, PL_lex_stuff, ckWARN(WARN_ILLEGALPROTO), 0); have_proto = TRUE; -- Perl5 Master Repository