Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reject inedexed zero sized type #712

Open
Y-Nak opened this issue May 20, 2022 · 2 comments
Open

Reject inedexed zero sized type #712

Y-Nak opened this issue May 20, 2022 · 2 comments
Labels
comp: analyzer Everything that involves the analyzer pass good first issue Good for newcomers

Comments

@Y-Nak
Copy link
Member

Y-Nak commented May 20, 2022

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.

@Y-Nak Y-Nak added good first issue Good for newcomers comp: analyzer Everything that involves the analyzer pass labels May 20, 2022
@Y-Nak Y-Nak changed the title Forbid inedexed zero sized type Reject inedexed zero sized type May 20, 2022
@kris524
Copy link

kris524 commented May 22, 2022

Hello, can I take this task? Is there any additional information I might need?

@Y-Nak
Copy link
Member Author

Y-Nak commented May 27, 2022

Hi @kris524! Sorry for the late response.
Thanks for your contribution, please feel free to take this issue.

To resolve this issue, you would need to add is_zero_sized or a similar method to

. Then, check the indexed field types and reject them if they are zero-sized.

Please feel free to ask me any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: analyzer Everything that involves the analyzer pass good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants