When overriding a nullable function/property, with a return-null implementation, is it generally good practice to change the signature to
Nothing?
Copy code
override val foo: Nothing? get() = null
e
ephemient
04/20/2024, 6:24 AM
I would generally say no. that prevents any further overrides from returning any non-null value. (and if that is your intent, then just make it final too)