crytic / crytic/slither

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

Open
#2,837 1 comment 0 reactions 0 assignees View on GitHub
bug-candidate
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

### 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:

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.