// !LANGUAGE: +NewInference // !DIAGNOSTICS: -UNUSED_PARAMETER interface Base class Derived : Base class OtherDerived : Base class Inv class Out class In class BiParam fun id(arg: K) = arg fun createDoubleIn(arg: D): In> = TODO() fun createDoubleInOut1(arg: D): In>> = TODO() fun createDoubleInOut2(arg: D): In>> = TODO() fun createDoubleInOut3(arg: D): Out>> = TODO() fun createInOut(arg: D): In> = TODO() fun createOutIn(arg: D): Out> = TODO() fun createInvOut(arg: D): Inv> = TODO() fun createOutInvDoubleIn(arg: D): Out>>> = TODO() fun biparamEarly(first: F, second: S): BiParam>, Out> = TODO() fun biparamEarlyIrrelevantInv(first: F, second: S): BiParam>, Inv> = TODO() fun biparamEarlyStarProjection(first: F, second: S): BiParam<*, In>> = TODO() fun biparamLateIn(first: F, second: S): BiParam>, S> = TODO() fun biparamLateInv(first: F, second: S): BiParam>, S> = TODO() fun take(biParam: BiParam<*, In>>) {} fun testEarlyCompletion(derived: Derived, otherDerived: OtherDerived) { id>>( >")!>createDoubleIn(derived) ) id>>>( >>")!>createDoubleInOut1(derived) ) id>>>( >>")!>createDoubleInOut2(derived) ) id>>>( >>")!>createDoubleInOut3(derived) ) id>, Out>>( >, Out>")!>biparamEarly(derived, otherDerived) ) id>, Inv>>( >, Inv>")!>biparamEarlyIrrelevantInv(derived, otherDerived) ) take( >>")!>biparamEarlyStarProjection(derived, otherDerived) ) } fun testLateCompletion(derived: Derived, otherDerived: OtherDerived) { id>>( >")!>createInOut(derived) ) id>>( >")!>createOutIn(derived) ) id>>( >")!>createInvOut(derived) ) id>>>>( >>>")!>createOutInvDoubleIn(derived) ) id>, OtherDerived>>( >, OtherDerived>")!>biparamLateIn(derived, otherDerived) ) id>, OtherDerived>>( >, OtherDerived>")!>biparamLateInv(derived, otherDerived) ) }