Skip to content

Multiple params in the same param list with the same name are accepted #17568

Closed
@ben0x539

Description

@ben0x539

Both type and value parameters. This compiles just fine, short of the unused-variable warnings:

fn f<T, T>(t: T, t: T) {}

That seems like a fairly useless feature, I imagine people would only ever do this by accident and then get fairly confused about why the "wrong" parameter is being used, if they somehow don't run into type errors. So I am posting this here in the hope it is a bug and not something that needs an RFC to be fixed.

This is half a duplicate of #15969 but not a duplicate of the issue that is a duplicate of, imo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions