the deprecated function with the 'not' signature ...
# announcements
k
the deprecated function with the 'not' signature is a great idea though I failed to give full context and unfortunately I need it for a generic of a generic full context: I'm trying to create a Kotlin property backed by a BehaviourRelay (an Rx observable object) and want to ensure obvious mutables aren't used
Copy code
class BehaviorRelayUpdateOnlyProperty<T>(relay: BehaviorRelay<T>) : BehaviorRelayProperty<T>(relay)
I wanted to prevent T from extending MutableCollection - but with your solution the new constructor shares the same JVM signature as the original
constructor(mutablePropertyRelay: BehaviorRelay<MutableCollection<*>>) : this(mutablePropertyRelay)
isn't accepted
k
Maybe work around that with factories and
@JvmName
? In the end I think this really should be a lint check instead.