Correct - and I’m fine with StatusViewProcessor&lt...
# announcements
t
Correct - and I’m fine with StatusViewProcessor<SmartDevice> since StatusViewProcessor HAS to be T:SmartDevice anyway, but then it says this class isn’t compatible: class BatteryStatusViewProcessor : StatusViewProcessor<Battery>
d
thymecypher: So
class BatteryStatusViewProcessor : StatusViewProcessor<Battery>
does not compile with
Battery
extending
SmartDevice
?
t
Correct, I get Error:(46, 33) Type mismatch: inferred type is BatteryStatusViewProcessor but StatusViewProcessor<SmartDevice>? was expected
And if I’m not mistaken, I was getting the “Update to Kotlin 1.1” dialog - it’s not appearing meaning I probably inadvertently clicked it, and I hadn’t touched this code in a week or so - may that be why?
d
Well, yes, BatteryStatusProcessor is a StatusViewProcessor<Battery>, not a StatusViewProcessor<SmartDevice>
You can say StatusViewProcessor<out SmartDevice> though
t
Yeah, then I’d be stuck checking type inside the class but that might be fine.
Thanks!