I have a property inside protocol and I make an extension to my class it forces me to override the set and get I want to able set and get the default
I tried to make it like the below but I get a warning "Function call causes an infinite recursion"
var didSelectSpecificCoinClousre: didSelectHandler? {
get {
return self.didSelectSpecificCoinClousre
}
set(value) {
self.didSelectSpecificCoinClousre = value
}
}
my protocol :
protocol SelectedSpecificCoinProtocol {
typealias didSelectHandler = () -> (Void)?
var didSelectSpecificCoinClousre:didSelectHandler? { get set }
}