Closed
Description
Given this code:
struct A;
impl A {
fn get(&self) -> u8 { 42 }
}
impl A {
fn get(&self) -> u8 { 24 }
}
fn main() {
let a = A;
a.get();
}
I would expect to get
error: duplicate method
but instead I get
error: multiple applicable items in scope
As far as I am aware, there's no way to actually pick one of the multiple methods, is there?
This seems to be highly related to #22889, but the same behavior occurs with the nightly on the playground, even when using static methods instead of instance methods.
Metadata
Metadata
Assignees
Labels
No labels