Odin icon indicating copy to clipboard operation
Odin copied to clipboard

#any_int does not work when using named arguments.

Open AaronGlazer opened this issue 3 years ago • 1 comments

Context

Odin: dev-2022-01:6ad262c2 OS: Windows 11 Home Basic (version: 21H2), build 22000.434 CPU: Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz RAM: 32445 MiB

Expected Behavior

The #any_int directive should work when using named arguments.

Current Behavior

The compiler does not autocast integer types to #any_int parameters when when using named arguments.

Failure Information (for bugs)

Steps to Reproduce

// any_int.odin

package any_int

foo :: proc(#any_int a: int) {}

main :: proc() {
    N: u8 = 10;
    foo(a = N);
}
  1. Compile with odin build any_int.odin
  2. See compiler errors

Failure Logs

Cannot assign value 'N' of type 'u8' to 'int' in procedure argument

AaronGlazer avatar Jan 23 '22 21:01 AaronGlazer

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 22:07 github-actions[bot]