Description
When using verible-verilog-ls inside VS Code with UVM source code, the Go to Definition command often jumps to the forward declaration
typedef class uvm_sequence_base;
inside uvm_pkg.sv, instead of the actual class … endclass definition located in uvm_sequence_base.svh.
This happens for many UVM types (e.g. uvm_objection, uvm_sequencer, uvm_component, etc.).
Renaming these typedef class uvm_*; lines (for example, to typedef class uvm_rename_*;) immediately makes Go-to-Definition jump to the correct class body, which suggests the language server returns multiple definition locations and VS Code chooses the first one (the typedef).
Steps to Reproduce
- Open a UVM workspace in VS Code.
- Open any file that references
uvm_sequence_base.
- Invoke Go to Definition
Actual Result
Cursor jumps to the declaration:
typedef class uvm_sequence_base;
in uvm_pkg.sv
Expected Result
Cursor should jump to the actual class definition:
class uvm_sequence_base extends uvm_sequence_item;
...
endclass
in uvm_sequence_base.svh.