PL/SQL parse errors

Hi,

SQ version: 10.6

I’ve noticed several parse errors:

create or replace package pkg as

  procedure foo;
  pragma deprecate (foo); -- parse error
  
end pkg;
create or replace type BaseType force is object (
  flag varchar2(1)
) not instantiable not final;
/

create or replace type TableType force as table of varchar2(100);
/

create or replace type TestPipe force under BaseType (

  static function getValue 
    return TableType pipelined -- parse error

);
/
create or replace type body SubTestType is

  overriding member procedure testProcecdure
  is
  begin
    (self as BaseType).testProcecdure(); -- parse error
  end;

end;
/
create or replace type TestType force as object (

  testAttr number,
  final static function testDeter(inVal in number) return boolean deterministic -- parse error
  
) not instantiable not final;
/
create or replace package pkg as
end pkg;
/

create or replace package body pkg as

  valLength constant number := 100;

  procedure testProc is
    keyVal varchar2(valLength); -- parse error
  begin
    null;
  end testProc;
  
end pkg;
/

Could you please fix them?

Thank you very much!

Karl

Hello @Karl,

I am able to reproduce the parsing errors on your snippets. However, I do not have the same location when doing the analysis:

  1. line 1 (as opposed to line 4 for you)
  2. line 9 (as opposed to line 12 for you)
  3. line 1 & line 5 (as opposed to line 6 only for you)
  4. line 1 (as opposed to line 4 for you)
  5. line 5 (as opposed to line 10 for you)

Can you share your analysis output?

Thank you,

Hello @sebastien.marichal,

I’ve opened these snippets with SSLR Toolkit (recoveryMode ‘false’) - then you should get ‘my’ line numbers.

Thank you!
Karl

Hello @Karl,

I was not able to reproduce the same errors as you got but I do get parsing errors.
So I created a ticket to fix the issues.

https://sonarsource.atlassian.net/browse/SONARPLSQL-858

Thank you for reporting the issue.

Have a nice day!

It’s concerning to hear that you couldn’t replicate these issues… and the link to the ticket is useless because only Sonar employees can access😉

I can reproduce them exactly as reported with https://binaries.sonarsource.com/CommercialDistribution/sslr-plsql-toolkit/sslr-plsql-toolkit-3.14.0.6845.jar

1 Like

Hi @Scott,

Thank you for the screenshots!

Karl