// Copyright Kani Contributors // SPDX-License-Identifier: Apache-2.0 OR MIT // This test checks that we can handle potential naming conflicts when // generic types give the same Trait::function name pairs. trait Foo { fn method(&self, t: T) -> T; } trait Bar: Foo + Foo {} impl Foo for () { fn method(&self, t: T) -> T { t } } impl Bar for () {} #[kani::proof] fn main() { let b: &dyn Bar = &(); // The vtable for b will now have two Foo::method entries, // one for Foo and one for Foo. let result = >::method(b, 22_u32); assert!(result == 22_u32); }