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

Issue with implicit enum value specification for procedure groups #4295

Open
VladPavliuk opened this issue Sep 23, 2024 · 0 comments
Open

Issue with implicit enum value specification for procedure groups #4295

VladPavliuk opened this issue Sep 23, 2024 · 0 comments

Comments

@VladPavliuk
Copy link
Contributor

Reproduces for Windows 10 & Odin Version: dev-2024-09:f7d74ff3a

When I try to call procedure group: renderImageRect Odin can't figure out enum value passed without being fully specified:

renderImageRect(shrinkRect(checkboxRect, 3), ctx.zIndex, .CHECK_ICON) // TextureType.CHECK_ICON works fine

Error:

Cannot determine type for implicit selector expression '.CHECK_ICON'

A bit more context:

  • shrinkRect method is defined as the following:
shrinkRect :: proc(using rect: Rect, amount: i32) -> Rect
  • renderImageRect is defined as the following:
renderImageRect :: proc{renderImageRectVec_Float, renderImageRectVec_Int, renderImageRect_Int}

If try to call renderImageRect in this way it works fine:

renderImageRect(checkboxRect, ctx.zIndex, .CHECK_ICON) // works fine

So for some reasons even though shrinkRect(...) returns the same type as checkboxRect variable, the compiler can't resolve 3 parameter by it's implicit value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant