Opened 4 years ago

Closed 4 years ago

#1136 closed defect (fixed)

The syntax checker often marks the wrong line in a package

Reported by: kaare Owned by:
Priority: minor Milestone:
Component: editor Version: 0.80
Keywords: Cc:

Description

The error is marked on the line "before" the faulty line.

Reported by several users(El_Che, kaare).

Attachments (1)

syntaxcheck_error.jpg (14.6 KB) - added by claudio 4 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 4 years ago by zenogantner

Can you give an example file where this happens?
I cannot reproduce the bug with such sparse information.

Changed 4 years ago by claudio

comment:2 Changed 4 years ago by claudio

  • Priority changed from major to minor

It only seems to happen in packages, not in the main pl file.
See the attachment.

In copy-pastable format:

_
package TestClass?;
use strict;
use warnings;

sub is_type {

my $status = 0;
lala; # Error
return $status;

}
This is also an error
_

comment:3 Changed 4 years ago by azawawi

most probably this is related to ticket:1156

comment:4 Changed 4 years ago by zenogantner

The "?" was included by Trac. It is the same example because from this bug report I found the (in my opinion unrelated) bug reported in #1156.

comment:5 Changed 4 years ago by azawawi

  • Resolution set to fixed
  • Status changed from new to closed
  • Summary changed from The syntax checker often marks the wrong line to The syntax checker often marks the wrong line in a package

Yes true. It is definitely not related to #1156. It only happens in a package since we wrap the code to make sure the syntax checker task sees that package in %INC and then switch the line directive to zero instead of one. Fixed in r13930.

Note: See TracTickets for help on using tickets.