protocol Enum { static func associatedValue(_ value: String) -> Self static var singleValue: Self { get } } enum Foo: Enum { static func associatedValue(_ value: String) -> Foo { _associatedValue(value) } static var singleValue: Foo { _singleValue } case _associatedValue(String) case _singleValue }