Maksym M.
04/12/2025, 2:18 PMcommonMain
definition and implementation of certain interface
fun interface EffectContainer {
fun effects(): Set<Effect>
}
class RootEffectContainer : EffectContainer {
override fun effects() = emptySet<Effect>()
}
I am trying to create an instance of a RooEffectContainer
from Swift in iosMain
and get the error
Type 'any Effect' does not conform to protocol 'Hashable'
From a quick lookup there doesn't seem to be a simple solution to what seems to an extremely basic use case.
What am I missing? Is there a quick way to enable the protocol Hashable for Kotlin interface? Is there a way to mitigate this issue?Chrimaeon
04/12/2025, 2:27 PMMaksym M.
04/12/2025, 2:59 PMChrimaeon
04/12/2025, 3:08 PMMaksym M.
04/12/2025, 3:08 PMMaksym M.
04/12/2025, 3:09 PMI guess it cannot be address by the nature how swift `Set`s are defined.I can understand this, I am just wondering if there is any interop that doesn't involve creating a ton of wrappers
Maksym M.
04/12/2025, 3:10 PMChrimaeon
04/12/2025, 3:10 PM