dazza5000
03/12/2020, 6:30 PMmarstran
03/12/2020, 6:38 PMCardReaderStatus
.dazza5000
03/12/2020, 6:39 PMdazza5000
03/12/2020, 6:39 PMmarstran
03/12/2020, 6:40 PM{ success(it) }
would kinda be equivalent, right? But that doesn’t work, because it
is of type Any?
, not CardReaderStatus
marstran
03/12/2020, 6:41 PMmarstran
03/12/2020, 6:46 PMAny?
or a super type of it (which there are none of in this case). So the variance goes the opposite way of what you think here 🙂dazza5000
03/12/2020, 6:47 PMstreetsofboston
03/12/2020, 6:48 PMadk
03/12/2020, 6:48 PMdazza5000
03/12/2020, 6:49 PMdazza5000
03/12/2020, 6:49 PMdazza5000
03/12/2020, 6:50 PMadk
03/12/2020, 6:50 PMmarstran
03/12/2020, 6:51 PMstreetsofboston
03/12/2020, 6:54 PMstreetsofboston
03/12/2020, 6:56 PMinterface Function<in A, out R> {
fun call(a: A): R
}
dazza5000
03/12/2020, 7:06 PM