Claus Pedersen
Member³
I have the following code:
Compilation of this code gives:
7 Hint: Value assigned to 'ret' never used in 'tester'
This is not correct. If line with the CASE construct is removed, the function is correctly compiled with no hints. Can this be fixed?
Code:
CREATE OR REPLACE FUNCTION tester (param IN NUMBER)
RETURN BOOLEAN IS
test VARCHAR2(1);
ret BOOLEAN;
BEGIN
IF param = 1 THEN
ret := TRUE;
ELSE
test := CASE param WHEN 2 THEN 'Y' ELSE 'N' END;
ret := (test = 'N');
END IF;
RETURN ret;
END tester;
7 Hint: Value assigned to 'ret' never used in 'tester'
This is not correct. If line with the CASE construct is removed, the function is correctly compiled with no hints. Can this be fixed?