Closed ivlevAstef closed 6 years ago
struct DITags { fileprivate init() { } } extension DITags { var tag1: Void { return () } var tag2: Void { return () } } extension DITags { var name: String { return "MainStoryboard" } } let path1 = \DITags.tag1 print(path1) let path2 = \DITags.tag2 print(path2) let path1_1 = \DITags.tag1 print(path1_1) print(path1 == path2) // false print(path1 == path1_1) // true let namePath = \DITags.name print(DITags()[keyPath: namePath]) // MainStoryboard
not works :(