Toad World® Forums

Code-analysis: Wrong Rule 2131 - Use CONSTANT keyword wherever possible

v_toad_test_type cannot be a constant:

CREATE TYPE toad_test_type AS OBJECT ( x NUMBER(1), MEMBER PROCEDURE init_x );

CREATE TYPE BODY toad_test_type AS
MEMBER PROCEDURE init_x AS
BEGIN
x := 1;
END init_x;
END;

CREATE OR REPLACE PROCEDURE toad_test AS
v_toad_test_type CONSTANT toad_test_type := NEW toad_test_type(0); – Rule 2131
BEGIN
v_toad_test_type.init_x();
END toad_test;

Good catch, thanks Peter. Will fix asap.
(QP-2387)

Andre

Fixed in QP5 component version 5.314.

Thanks.