Toad World® Forums

Invalid package compilation with optional array parameter and named END clause

Hi,

I’v encountered a problem, possibly a bug in Toad, when package specification has a procedure with optional array parameter and I close the package by typing its name after ‘END’.

This works:

CREATE OR REPLACE PACKAGE test_cast AS
TYPE t_arr IS TABLE OF NUMBER INDEX BY VARCHAR2 (1);
PROCEDURE proc1 (p_arr IN t_arr DEFAULT CAST (NULL AS t_arr));
END;

This does not work:

CREATE OR REPLACE PACKAGE test_cast AS
TYPE t_arr IS TABLE OF NUMBER
INDEX BY VARCHAR2 (1);
PROCEDURE proc1 (p_arr IN t_arr DEFAULT CAST (NULL AS t_arr));
END test_cast;

When compiling with SQL*Plus, it works, of course.

My Toad for Oracle version: 12.6.0.53 Base Edition.

Thanks for any comments or de-bug :slight_smile: