Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing check for inconsistent trait method labels #872

Open
Y-Nak opened this issue Apr 17, 2023 · 0 comments
Open

Missing check for inconsistent trait method labels #872

Y-Nak opened this issue Apr 17, 2023 · 0 comments
Labels
v2-resolve This issue will be resolved in fe-v2 implementation

Comments

@Y-Nak
Copy link
Collaborator

Y-Nak commented Apr 17, 2023

The compiler doesn't check the consistency label in a trait method.
Example:

pub trait Add {
    fn add(self, label x: i32) -> Self;
}

impl Add for i32 {
    fn add(self, label2 x: i32) -> i32 {
        return self + x
    }
}

expected: method `add` has incompatible parameters for `add` of trait `Add`
actual: none

This makes impossible to call trait method in some cases.

@Y-Nak Y-Nak added the v2-resolve This issue will be resolved in fe-v2 implementation label Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2-resolve This issue will be resolved in fe-v2 implementation
Projects
None yet
Development

No branches or pull requests

1 participant