Skip to content

Inability to use local/protected and virtual qualifiers simultaneously #1061

@chykon

Description

@chykon

Icarus Verilog does not support the simultaneous use of access qualifiers (local, protected) and the virtual qualifier.

Example (not working):

class example_class;
  local function local_function();
  endfunction

  protected function protected_function();
  endfunction

  virtual function virtual_function();
  endfunction

  local virtual function local_and_virtual_function();
  endfunction

  protected virtual function protected_and_virtual_function();
  endfunction
endclass

module tb;
endmodule

Command:

iverilog -g2012 example.sv

Output:

example.sv:11: syntax error
example.sv:11: error: Invalid class item.
example.sv:12: syntax error
example.sv:14: error: Invalid class item.
example.sv:15: syntax error
example.sv:18: error: Invalid class item.
example.sv:19: syntax error
I give up.

Expected behavior: everything should work

Version: Icarus Verilog version 12.0 (stable)


Related:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions