import Foundation protocol HogeProtocol: Equatable { static var aaa: Self { get } static var bbb: Self { get } } //extension HogeProtocol { // static func == (lhs: Self, rhs: Self) -> Bool { // return lhs == rhs // } //} enum Hoge: HogeProtocol { case aaa case bbb } let hoge: (some HogeProtocol) = Hoge.aaa if hoge == .aaa { print("aaa") }