Skip to content

[BUG] Function overloading with an @enum type produces unexpected results #687

Closed
@guybrush77

Description

@guybrush77

Describe the bug

Function overloading with an @enum type produces unexpected results.

To Reproduce

Try the following code:

Color: @enum type = {
    RED;
    GREEN;
    BLUE;
}

foo: (color: Color) = {
    std::cout << "Invoked foo: (color: Color)\n";
}

foo: (color: _) = {
    std::cout << "Invoked foo: (color: _)\n";
}

main: () = {
    foo(Color::RED);
}

After running this program, I'd expect to see the following on stdout:

Invoked foo: (color: Color)

Instead, the generic function is called:

Invoked foo: (color: _)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions