enumCharacter { enumWeapon { caseBow caseSword caseLance caseDagger } enumHelmet { caseWooden caseIron caseDiamond } caseThief caseWarrior caseKnight } //Access like this: let character =Character.Thief let weapon =Character.Weapon.Bow let helmet =Character.Helmet.Iron
When accessing nested enumeration members, it is not necessary to enter such a long level every time to access them. You can use convenient methods to access them directly.