Created
April 15, 2024 08:12
-
-
Save T1T4N/d84ba8ca6edeec9bfeb3fdbad0f1e631 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@objc public protocol TestProto1 {} | |
public protocol TestProto2: Hashable {} | |
public enum Destination: Hashable, Equatable { | |
// OKAY - Concrete | |
case test(obj: NSObject) | |
// Error: any type (not concrete/boxed) | |
// Type 'AppFeatureDestination' does not conform to protocol 'Equatable' | |
case test1(obj: NSObject & TestProto1) | |
// Error: Associated value type 'any TestProto2' does not conform to protocol 'Hashable', preventing synthesized conformance of 'AppFeatureDestination' to 'Hashable' | |
case test2(obj: any TestProto2) | |
//Associated value type 'any NSObject & TestProto2' does not conform to protocol 'Equatable', preventing synthesized conformance of 'AppFeatureDestination' to 'Equatable' | |
case test3(obj: any NSObject & Equatable & TestProto2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment