Syntax highlighting does not work inside CASE statement

Claus Pedersen

Member³
Bumped from beta forum post 45545:

I have the following code snippet in a program window:
Code:
PROCEDURE test (param IN OUT INT) IS -- highlight works here
  var INT;
BEGIN
  param := 1; -- highlight works here
  FOR i IN 1..2 LOOP
    var := CASE WHEN i=2 THEN param END; -- highlight does not work here
  END LOOP;
END;

When the cursor is placed at 'param' in line 1, all instances of param are highlighted (lines 1,4, and 6). Same goes for line 4.
But when the cursor is placed at 'param' in line 6, highlight does not work.

A fix was promised in January, but it is still a problem.
 
@IvanZ: I still can not get it to work if I place the cursor on the parameter 'param' inside the CASE statement (line 6). If I place the cursor on 'param' in line 4, it works.

@Marco: what is the ETA for this fix? This month, this quarter, this year? ;-)
Many of the errors reported during the beta tests are still not fixed. Do you have a plan for fixing these issues?
 
Well.. it's even more complex.
See comments

Code:
CREATE PROCEDURE test2 (param2 IN OUT binary_integer) as -- param2 highlight works here
  var binary_integer;

  PROCEDURE test (param IN OUT binary_integer) IS -- param highlight works here
  var binary_integer;
   BEGIN
     param := 1; -- param highlight works here
     FOR i IN 1..2 LOOP
       var := CASE WHEN i=2 THEN param END; -- param highlight  does not!!! work here
     END LOOP;
   END;

BEGIN
  param2 := 1; -- param2 highlight works here
  FOR i IN 1..2 LOOP
    var := CASE WHEN i=2 THEN param2 END; -- param2 highlight does!!! work here
  END LOOP;
END;
 
@IvanZ: Thanks for the extended example. Yes, this seems strange, and if you rename the parameter param in procedure test into param2 (including the assignment and case statement), the highlight of param2 in line 8 (the case statement) will highlight the global param2 parameter so all 6 param2 parameters are highlighted, where only the three local instances of param2 should be highlighted.

So this is clearly an issue that needs to be corrected by the development team.
 
Back
Top