Reject inedexed zero sized type
Open
comp: analyzer
good first issue
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 218
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
### What is wrong?
Currently, it is allowed to mark a zero-sized type field as an indexed field, but this doesn't make sense because a zero-sized type will never be encoded.
e.g.
```
event MyEvent:
idx x: ()
```
should be rejected.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the compiler validation for indexed fields in event declarations and how zero-sized types such as () are represented. Reproduce the example with `idx x: ()`, then make the compiler reject it with an appropriate diagnostic and verify that valid indexed fields still compile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100