package Ġnet . t ass ia . event Ċ Ċ import Ġkotlin . test . Test Ċ Ċ class ĠRe ified Event Test Ġ{ ĊĊ ĉ private Ġclass ĠTest Event Ġ: ĠEvent () ĊĊ ĉ private Ġvar Ġtest 1 Ġ= Ġfalse Ċ ĉ private Ġvar Ġtest 2 Ġ= Ġfalse ĊĊ ĉ @ Test Ċ ĉ fun Ġtest () Ġ{ Ċĉ ĉ val Ġmanager Ġ= ĠEvent Manager . new Default () Ċĉ ĉ manager . register Event < Test Event >() ĊĊĉ ĉ manager . register Listener ( Test Listener ()) Ċĉ ĉ manager . register Listener ( this :: test Listener ) ĊĊĉ ĉ manager . call Event ( Test Event ()) ĊĊĉ ĉ assert ( test 1 ) Ċĉ ĉ assert ( test 2 ) Ċ ĉ } ĊĊĊĊ ĉ private Ġfun Ġtest Listener ( event : ĠTest Event ) Ġ{ Ċĉ ĉ test 2 Ġ= Ġtrue Ċ ĉ } ĊĊ ĉ private Ġinner Ġclass ĠTest Listener Ġ: ĠEvent Listener < Test Event > Ġ{ Ċĉ ĉ override Ġfun Ġon Event ( event : ĠTest Event ) Ġ{ Ċĉĉ ĉ test 1 Ġ= Ġtrue Ċĉ ĉ } Ċ ĉ } Ċ Ċ } Ċ