Odin icon indicating copy to clipboard operation
Odin copied to clipboard

Fields inside unions are allowed to override the union with the same name (or something)

Open ftphikari opened this issue 2 years ago • 1 comments

This thing shouldn't compile:

Message :: struct {
    id: int,
    type: union {
        Resize_Message,
    },
}

// depending if `type: int` is declared before or after `message`, you get a different result when trying to access it
Resize_Message :: struct {
    type: int,
    using message: ^Message,
}

ftphikari avatar Mar 23 '22 20:03 ftphikari

Hello!

I am marking this issue as stale as it has not received any engagement from the community or maintainers 120 days. That does not imply that the issue has no merit! If you feel strongly about this issue

  • open a PR referencing and resolving the issue;
  • leave a comment on it and discuss ideas how you could contribute towards resolving it;
  • leave a comment and describe in detail why this issue is critical for your use case;
  • open a new issue with updated details and a plan on resolving the issue.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone..

github-actions[bot] avatar Jul 24 '22 21:07 github-actions[bot]

Please reopen.

ftphikari avatar Dec 23 '22 22:12 ftphikari

Please reopen.

ftphikari avatar Dec 26 '22 01:12 ftphikari

Please reopen? :(

ftphikari avatar Dec 28 '22 15:12 ftphikari