ethereum/fe

Missing check for inconsistent trait method labels

Y-Nak opened this issue · 0 comments

Y-Nak commented

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.