Wrong compiler hint in program window


Code:
create or replace procedure compiler_wrong_hint
/*
Compilation errors for PROCEDURE NSMEP.COMPILER_WRONG_HINT

Error: Hint: Value assigned to 'l_hint_var' never used in 'compiler_wrong_hint'
Line: 12
Text: l_hint_var:= 'xxx';
*/
is
  l_hint_var varchar2(100);
begin
  l_hint_var:= 'xxx';
  --
  begin
    null;
  exception
    when others then
      dbms_output.put_line(l_hint_var);
  end;
end;
 
@Michael Maramzin: This is indeed not correct, we'll fix it.

@rumi: It seems that you do not have Oracle Net installed. This is a requirement.
 
Interesting, no error for this:

create or replace procedure compiler_wrong_hint
is
l_hint_var varchar2(100) := 'xxx';
begin
--
begin
null;
exception
when others then
dbms_output.put_line(l_hint_var);
end;
end;
 
Back
Top