<i>continuation lines \<newline> produce wrong line numbers in tracebacks</i>.
by
.
D 2020-01-01T18:29:44.970
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment When\susing\scontinuation\slines\swith\sthe\s\\<newline>\ssubstitution\r\nrule,\sit\scauses\serror\strace-backs\sto\shave\sthe\swrong\sline\snumbers\r\nand\s[info\sbody]\sdoesn't\sreturn\sthe\soriginal\sscript\sas\sis,\sbut\r\nonly\safter\sthe\ssubstitution,\sthus\salso\saffecting\sline\snumbers.\r\n\r\nFor\sexample,\sthis\sscript\r\n\r\nproc\sfoo\s{args}\s{\r\n\tset\sbar\s[string\srepeat\s\\\r\n\t"blah"\s\\\r\n\t50]\r\n\texpr\s1/0\r\n}\r\nfoo\r\n\r\nwill\sreport\sa\sdivide\sby\szero\serror\son\sline\s3\sof\sfoo,\snot\sline\s5.\r\n\s\r\nAlso,\s[info\sbody]\swill\sreturn\sthe\scommand\schanged\sas\sso:\r\n\r\n\tset\sbar\s[string\srepeat\s"blah"\s50]\r\n\r\nwhich\scan\salso\saffect\sthe\sreporting\sof\sline\snumbers.\s\r\n\r\nThe\sproblem\sis\slikely\sthat\sthe\ssaving\sof\sthe\sscript\sfor\sa\r\nproc\sis\sdone\safter\sthe\s\\<newline>\spre-process\spass\srather\r\nthan\sbefore.\sThis\sprobably\scauses\straceback\sto\smiscount\s\r\n<newlines>\swhile\sscanning\sthe\sscript\stext\sto\sfind\sthe\sline\r\nin\serror.
J foundin 8.6.9
J is_private 0
J login anonymous
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter anonymous
J subsystem 45.\sParsing\sand\sEval
J title continuation\slines\s\\<newline>\sproduce\swrong\sline\snumbers\sin\stracebacks
J type Bug
K 7cc223908762351c613244a0914a2d13acf7cfd2
U anonymous
Z ada33bee424589100785a02c2696c5f6