Hi. Your task can be solved without language changes, if I understand it correctly.
// Firstly, create this struct:
@propertyWrapper
public struct EquatableExcluded<T>: Equatable {
public var wrappedValue: T
public init(wrappedValue: T) {
self.wrappedValue = wrappedValue
}
public init(_ wrappedValue: T) {
self.init(wrappedValue: wrappedValue)
}
public static func == (lhs: Self, rhs: Self) -> Bool { true }
}
extension EquatableExcluded: Hashable {
/// Empty Implementation
public func hash(into hasher: inout Hasher) {}
}
// Then wrap your associated values
enum Navigation: Hashable {
case firstScreen(EquatableExcluded<FirstScreenData>)
case secondScreen(EquatableExcluded<SecondScreenData>)
}
There are also some other similar pithes: Comparing enum cases while ignoring associated values - #8 by Dmitriy_Ignatyev