That must be it.always share actual code when you can.
I'll log a bug for you.
And what someone said earlier, I'd say for best practices, keep your pl/sql
objects in separate files. But this SHOULD be working.
Jeff
From: Paul Houghton <Paul.Houghton@xxxxxxxxxxxxx>
Sent: Tuesday, March 19, 2019 12:13 PM
To: Jeff Smith <jeff.d.smith@xxxxxxxxxx>; oracle-l@xxxxxxxxxxxxx
Cc: Sheehan, Jeremy <JEREMY.SHEEHAN@xxxxxxx>; niall.litchfield@xxxxxxxxx
Subject: RE: SQL Developer line numbers
Thanks Jeff
Your example doesn't have a body, just a package. I think it gets confused when
there is a package and a body in the same worksheet. It counts line number from
the package definition, not the package body.
Here is my script. I do have some random SQL statements above, but I don't
think that matters. I compiled the body using F9 with the cursor in the body.
-- Start
Select 1 from dual;
Select 2 from dual;
create or replace package errors_much as
procedure x( a in integer);
procedure y (b in date);
end errors_much;
/
create or replace package body errors_much is
procedure x(a integer) is
begin
dbms_output.put_line (to_char(a));
end x;
procedure y(b in date) is
begin
dpms_output.put_line(to_char(b));
end y;
end errors_much;
/