// ĠCopyright Ġ( c ) Ġ 2 0 2 0 , Ġthe ĠR 8 Ġproject Ġauthors . ĠPlease Ġsee Ġthe ĠAUTHORS Ġfile Ċ // Ġfor Ġdetails . ĠAll Ġrights Ġreserved . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġa Ċ // ĠBSD - style Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ package Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ app Ċ Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . API Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Alpha Naming Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Arr 1 D Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Arr 2 D Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Arr 2 D Tester Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . C With Constructor Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . C With Constructor Tester Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Class With Companion C Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Function Tester Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Impl Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Int Set Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Interface Tester Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . My Advanced Map Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . My I Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . My Map To Set Of Int Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Outer Nested Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Outer Nested Inner Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Outer Tester Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Simple Class Tester Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Still C With Constructor Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Sub TypeOf Alias Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Under lying Type Tester Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Unused Type Argument Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . Vertical Class Mer ging Tester Ċ import Ġcom . android . tools . r 8 . kotlin . metadata . type alias _ lib . seq Ċ Ċ class ĠProgram Class Ġ: ĠImp l () Ġ{ ĊĠ Ġoverride Ġfun Ġfoo (): ĠAPI Ġ{ ĊĠĠĠ Ġsuper . foo () ĊĠĠĠ Ġprintln (" Program :: foo ") ĊĠĠĠ Ġreturn Ġthis ĊĠ Ġ} Ċ } Ċ Ċ fun Ġtest Unused Argument () Ġ{ ĊĠ Ġval Ġu Ġ= ĠUn used Type Argument < Int >(); Ċ } Ċ Ċ fun Ġtest Simple Class () Ġ{ ĊĠ Ġval Ġsimple Ġ= Ġobject Ġ: ĠAlpha Naming () Ġ{ Ġ} ĊĠ Ġprintln ( Simple Class Tester . f ( Simple Class Tester . g ( simple )). y ) Ċ } Ċ Ċ fun Ġtest Arr 2 D () Ġ{ ĊĠ Ġval Ġarr 1 d Ġ: ĠArr 1 D < Int > Ġ= ĠArr 1 D ( 4 2 ); ĊĠ Ġval Ġarr 2 d Ġ: ĠArr 2 D < Int > Ġ= ĠArr 2 D ( arr 1 d ); ĊĠ Ġprintln ( Arr 2 D Tester . f ( Arr 2 D Tester . g ( arr 2 d )). x . x ); Ċ } Ċ Ċ fun Ġtest Interface () Ġ{ ĊĠ Ġval Ġmy Instance Ġ= Ġobject Ġ: ĠMy I Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġf () Ġ{ ĊĠĠĠĠĠ Ġprintln (" 4 2 "); ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĠ ĠInterface Tester . f ( my Instance ). f () ĊĊĠ Ġval Ġmap Ġ: ĠMy Map To Set Of Int < Int > Ġ= ĠHashMap (); ĊĠ Ġval Ġset Ġ: ĠInt Set Ġ= Ġmutable Set Of ( 4 2 ); ĊĠ Ġmap . put ( 1 , Ġset ); ĊĠ Ġprintln ( Interface Tester . i ( Interface Tester . h ( map ))[ 1 ]?. iterator ()?. next () Ġ?: Ġ""); Ċ } Ċ Ċ fun Ġtest Function Types () Ġ{ ĊĠ ĠFunction Tester . f ( Function Tester . g ({ Ġi Ġ: ĠInt , Ġa Ġ: ĠAny Ġ-> ĊĠĠĠ Ġprintln ( i ) ĊĠĠĠ Ġprintln ( a ) ĊĠ Ġ})) ( 4 2 , Ġ" 4 2 ") ĊĠ ĠFunction Tester . h ( Function Tester . i ({ Ġb Ġ-> ĊĠĠĠ Ġprintln ( b ) ĊĠĠĠ Ġfalse ĊĠ Ġ})) ( true ) Ċ } Ċ Ċ fun Ġtest Nested Classes () Ġ{ ĊĠ Ġval Ġnested Ġ= ĠO uter Nested ( 4 2 ); ĊĠ Ġval Ġmy Inner Ġ: ĠO uter Nested Inner Ġ= Ġnested . Inner ( 1 ) ĊĠ Ġprintln ( Outer Tester . f ( Outer Tester . g ( nested )). y ) ĊĠ Ġprintln ( Outer Tester . h ( Outer Tester . i ( my Inner )). x ) Ċ } Ċ Ċ fun Ġtest Companion () Ġ{ ĊĠ Ġprintln ( Class With Companion C . foo On Companion ); Ċ } Ċ Ċ fun Ġtest Constructor () Ġ{ ĊĠ Ġprintln ( C With Constructor Tester . f ( C With Constructor Tester . g ( C With Constructor ( 4 2 ))). x ); Ċ } Ċ Ċ fun Ġtest Under lying Type () Ġ{ ĊĠ Ġval Ġc With Constructor Ġ= ĠStill C With Constructor ( 4 2 ) ĊĠ Ġprintln ( Under lying Type Tester . f ( Under lying Type Tester . g ( c With Constructor )). x ) ĊĠ Ġval Ġadvanced Map Ġ: ĠMy Advanced Map Ġ= ĠHashMap (); ĊĠ Ġval Ġnested Ġ= ĠO uter Nested ( 4 2 ); ĊĠ Ġval Ġmy Inner Ġ: ĠO uter Nested Inner Ġ= Ġnested . Inner ( 1 ) ĊĠ Ġadvanced Map . put ( nested , Ġmy Inner ); ĊĠ Ġval Ġsame Map Ġ= ĠUnder lying Type Tester . h ( Under lying Type Tester . i ( advanced Map )) ĊĠ Ġprintln ( same Map . get ( nested )?. x ) Ċ } Ċ Ċ fun Ġtest Vertical Class Mer ging () Ġ{ ĊĠ Ġval Ġapi Impl Ġ= ĠVertical Class Mer ging Tester . produce () ĊĠ ĠVertical Class Mer ging Tester . pass Through ( api Impl ). foo () Ċ } Ċ Ċ fun Ġtest Super Type () Ġ{ ĊĠ Ġprintln ( Sub TypeOf Alias :: class . sup ert ypes [ 0 ]. classifier ) Ċ } Ċ Ċ fun Ġmain () Ġ{ ĊĠ Ġval Ġinstance Ġ= ĠProgram Class () ĊĠ Ġval Ġl Ġ= Ġseq ( instance ) ĊĠ Ġfor Ġ( api Ġin Ġl ) Ġ{ ĊĠĠĠ Ġprintln ( api Ġ== Ġapi . foo ()) ĊĠĠĠ Ġprintln ( api . hey ()) ĊĠ Ġ} ĊĠ Ġtest Unused Argument () ĊĠ Ġtest Simple Class () ĊĠ Ġtest Arr 2 D () ĊĠ Ġtest Interface () ĊĠ Ġtest Function Types () ĊĠ Ġtest Nested Classes () ĊĠ Ġtest Companion () ĊĠ Ġtest Constructor () ĊĠ Ġtest Under lying Type () ĊĠ Ġtest Vertical Class Mer ging () ĊĠ Ġtest Super Type () Ċ } Ċ