-
-
Notifications
You must be signed in to change notification settings - Fork 874
Closed
Labels
Description
Implicit Selector Expressions do not work with overloaded procedures. Minimal standalone example:
package main
main :: proc() {
Bar :: enum {A}
foo1 :: proc(a: int, b: Bar) {}
foo2 :: proc(a: string, b: Bar) {}
foo :: proc{foo1, foo2};
foo1(1, .A);
foo2("", .A);
foo(1, Bar.A);
foo("", Bar.A);
foo(1, .A); // Cannot determine type for implicit selector expression '.A'
foo("", .A); // Cannot determine type for implicit selector expression '.A'
}
Full error:
main.odin(14:13) Cannot determine type for implicit selector expression '.A'
main.odin(14:5) No procedures or ambiguous call for procedure group 'foo' that match with the given arguments
Given argument types: (untyped integer, invalid type)
Did you mean to use one of the following:
main.foo1 :: proc(a: int, b: Bar) at main.odin(6:5)
main.foo2 :: proc(a: string, b: Bar) at main.odin(7:5)