Avatar
これみたいに macro で自動生成できないんだろうか https://forums.swift.org/t/introducing-staticmemberiterable-swift-macro/65454
StaticMemberIterable Confidently cover all static members. Like CaseIterable, this macro creates an array of all the static members of a type. This is useful when a type has a few examples as static members. Here, we have a Chili type so that we can discuss the heat level and names of various chilis. So far, we have two: jalapeño and habenero. ...