Skip to content

Function overloading can create unreachable functions #1611

@OliveIsAWord

Description

@OliveIsAWord

The Jakt compiler currently accepts these functions:

fn example() => ...
fn example(my_default_arg: u32 = 42) => ...

However, any call to example() will always call the second function. As far as I can tell, the first function cannot be called. This code should probably give an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions