Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct MyStruct {
- enum Test: Int {
- case a
- }
- enum AnotherTest: Int {
- case b
- }
- }
- let myThing: TYPE = someFunction(parameter)
- myThing.a //if TYPE is Test.self
- myThing.b //if TYPE is AnotherTest.self
- struct MyStruct {
- enum Test: Int {
- case a
- case b
- }
- }
Add Comment
Please, Sign In to add comment