dalexander
04/24/2017, 1:42 PMswitchIfEmpty accepts an ObservableSource which is an interface with a Single Abstract Method, and Kotlin (unhelpfully in this case) will do the conversion for you. It’s basically the same as calling it with switchIfEmpty( { ... } ) which creates an anonymous inner class of ObservableSource where the body of {} is overriding ObservableSource::subscribe