interface X: U, W interface Z: U, W interface U interface W interface A : X, Z interface B : X, Z fun interface IFoo where T : U, T : W { fun accept(t: T) } fun sel(x: T, y: T) = x class G where T: U, T: W { fun check(x: IFoo) {} } fun box(): String { val g = sel(G(), G()) g.check {} // TODO: report a compile time error for this case return "OK" }