Skip to content

Assembly references to storage variables are not included #602

@fvictorio

Description

@fvictorio

"Go to references" works well with assembly for local variables. For example, using it with value here correctly includes the assembly line:

uint value;

assembly {
  value = 1
}

But if you do the same thing with a storage variable, then it doesn't work:

contract Foo {
  uint public x;

  function inc() public {
    x++;
  }
  
  function set(uint _x) public {
    x = _x;
  }

  function setWithAssembly(uint _x) public {
    assembly {
      sstore(x.slot, _x)
    }
  }
}

Here, the references list for x includes x++ and x = _x, but it doesn't include sstore(x.slot, _x).

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:readyThis issue is ready to be worked ontype:improvementImprovement existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions