Why is this an issue?

A constant function is accessing a queue with a reversed range, which is defined to always yield an empty queue.

How to fix it

Code examples

Noncompliant code example

typedef int ret_type[$];
localparam ret_type foo = func();
function ret_type func;
  automatic int i[$] = {1, 2, 3};
  return i[2:0]; // Noncompliant: Reversed selection range [2:0] for queue will always yield an empty result
endfunction