This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix typo in bf1b738b; another line num bug
authorFather Chrysostomos <sprout@cpan.org>
Fri, 23 Aug 2013 05:58:37 +0000 (22:58 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 23 Aug 2013 07:09:33 +0000 (00:09 -0700)
This affects only mad builds.  The line number after

nullary_keyword_such_as_time
;

was off by one.

t/comp/parser.t
toke.c

index 027d712..28412da 100644 (file)
@@ -8,7 +8,7 @@ BEGIN {
     chdir 't';
 }
 
-print "1..160\n";
+print "1..162\n";
 
 sub failed {
     my ($got, $expected, $name) = @_;
@@ -587,5 +587,10 @@ ${check('parser\.t', 537, 'first line of interp in here-doc');;
   check('parser\.t', 538, 'second line of interp in here-doc');}
 EOW
 
+time
+#line 42
+;check('parser\.t', 42, 'line number after "nullary\n#line"');
+
+
 __END__
 # Don't add new tests HERE. See note above
diff --git a/toke.c b/toke.c
index 362aa71..53a691a 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -5601,7 +5601,7 @@ Perl_yylex(pTHX)
                    {
                        d++;
                        if (d < PL_bufend)
-                           incline(s);
+                           incline(d);
                    }
                    else if (d > PL_bufend) /* Found by Ilya: feed random input to Perl. */
                      Perl_croak(aTHX_ "panic: input overflow");