We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
enum UGCContent { case west case east func desp() { print("hello") } static func ugcFun(){ print("static") } } var rt = UGCContent.east rt.desp() UGCContent.ugcFun() enum Weekday: String, CaseIterable { case sunday, monday, tuesday, wednesday, thursday, friday, saturday /* 自动合成的实现 static var allCases: Self.AllCases { [sunday, monday, tuesday, wednesday, thursday, friday, saturday] } */ } let weekday = Weekday.allCases.map{ $0.rawValue}.joined(separator: ",") print(weekday) //对于有关联值的枚举,不会自动合成 allCases,因为关联值没法确定
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: