Allow using complex type as a map key
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 218
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 8
Description
### What is wrong?
Currently, using a complex type as a map key is not allowed.
It'd be better to relax this restriction.
```python
struct MyStruct:
x: u256
y: u256
contract Foo:
s: Map
```
### How can it be fixed
New `codegen` allow this feature, so just removing the checking in `analyzer` would work if there is no bug in `codegen`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the analyzer check that rejects complex map-key types, then inspect the codegen path to confirm its existing support. Done means the analyzer no longer blocks the shown MyStruct map key and the codegen behavior remains correct; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100