// ĠWITH _ RUNTIME Ċ import Ġkotlin . test . assertEquals Ċ Ċ @ Suppress (" OPTIONAL _ DECL AR ATION _ USAGE _ IN _ NON _ COMMON _ SOURCE ") Ċ @ kotlin . jvm . Jvm Inline Ċ value Ġclass ĠS ( val Ġx : ĠString ) Ċ Ċ interface ĠIF oo < T > Ġ{ ĊĠĠĠ Ġfun Ġmember Fun ( s 1 : ĠS , Ġs 2 : ĠString ): ĠString ĊĠĠĠ Ġfun Ġmember Fun T ( x 1 : ĠT , Ġx 2 : ĠString ): ĠString ĊĠĠĠ Ġfun Ġ< X > Ġgeneric Member Fun ( x 1 : ĠT , Ġx 2 : ĠX ): ĠString ĊĠĠĠ Ġfun ĠS . member Ext Fun ( s : ĠString ): ĠString ĊĠĠĠ Ġfun ĠT . member Ext Fun T ( x : ĠString ): ĠString ĊĠĠĠ Ġfun Ġ< X > ĠT . generic Member Ext Fun ( x : ĠX ): ĠString Ċ } Ċ Ċ @ Suppress (" OPTIONAL _ DECL AR ATION _ USAGE _ IN _ NON _ COMMON _ SOURCE ") Ċ @ kotlin . jvm . Jvm Inline Ċ value Ġclass ĠFoo Impl ( val Ġxs : ĠArray < String >) Ġ: ĠIF oo < S > Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġmember Fun ( s 1 : ĠS , Ġs 2 : ĠString ): ĠString Ġ= Ġxs [ 0 ] Ġ+ Ġs 1 . x Ġ+ Ġs 2 ĊĠĠĠ Ġoverride Ġfun Ġmember Fun T ( x 1 : ĠS , Ġx 2 : ĠString ): ĠString Ġ= Ġxs [ 0 ] Ġ+ Ġx 1 . x Ġ+ Ġx 2 ĊĠĠĠ Ġoverride Ġfun Ġ< X > Ġgeneric Member Fun ( x 1 : ĠS , Ġx 2 : ĠX ): ĠString Ġ= Ġxs [ 0 ] Ġ+ Ġx 1 . x Ġ+ Ġx 2 . toString () ĊĠĠĠ Ġoverride Ġfun ĠS . member Ext Fun ( s : ĠString ): ĠString Ġ= Ġxs [ 0 ] Ġ+ Ġthis . x Ġ+ Ġs ĊĠĠĠ Ġoverride Ġfun ĠS . member Ext Fun T ( x : ĠString ): ĠString Ġ= Ġxs [ 0 ] Ġ+ Ġthis . x Ġ+ Ġx ĊĠĠĠ Ġoverride Ġfun Ġ< X > ĠS . generic Member Ext Fun ( x : ĠX ): ĠString Ġ= Ġxs [ 0 ] Ġ+ Ġthis . x Ġ+ Ġx . toString () Ċ } Ċ Ċ class ĠTest Ġ: ĠIF oo < S > Ġby ĠFoo Impl ( array Of (" 1 ")) Ċ Ċ fun Ġbox (): ĠString Ġ{ ĊĠĠĠ Ġval Ġtest Ġ= ĠTest () ĊĊĠĠĠ ĠassertEquals (" 1 OK ", Ġtest . member Fun ( S (" O "), Ġ" K ")) ĊĠĠĠ ĠassertEquals (" 1 OK ", Ġtest . member Fun T ( S (" O "), Ġ" K ")) ĊĠĠĠ ĠassertEquals (" 1 OK ", Ġtest . generic Member Fun ( S (" O "), Ġ" K ")) ĊĊĠĠĠ Ġwith ( test ) Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals (" 1 OK ", ĠS (" O "). member Ext Fun (" K ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 1 OK ", ĠS (" O "). member Ext Fun T (" K ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 1 OK ", ĠS (" O "). generic Member Ext Fun (" K ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġreturn Ġ" OK " Ċ } Ċ