Skip to content

[Bug-Candidate]: Slither cannot recognize the selector of locally declared functions. #2837

@lum7na

Description

@lum7na

Describe the issue:

In Yul, Slither cannot recognize the selector of locally declared functions.

Code example to reproduce the issue:

contract C {
    function f() public {
        function() external g;
        assembly {
            g.selector := 1
        }
    }
}

Version:

0.11.3

Relevant log output:

ERROR:root:Error:
ERROR:root:unresolved reference to identifier g.selector
ERROR:root:Please report an issue to https://github.com/crytic/slither/issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-candidateBugs reports that are not yet confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions