@@ -27,6 +27,64 @@ public class UseEnumForNamespacingTests: DiagnosingTestCase {
27
27
final class E {
28
28
static let a = 123
29
29
}
30
+ struct Structure {
31
+ #if canImport(AppKit)
32
+ var native: NSSomething
33
+ #elseif canImport(UIKit)
34
+ var native: UISomething
35
+ #endif
36
+ }
37
+ struct Structure {
38
+ #if canImport(AppKit)
39
+ static var native: NSSomething
40
+ #elseif canImport(UIKit)
41
+ static var native: UISomething
42
+ #endif
43
+ }
44
+ struct Structure {
45
+ #if canImport(AppKit)
46
+ var native: NSSomething
47
+ #elseif canImport(UIKit)
48
+ static var native: UISomething
49
+ #endif
50
+ }
51
+ struct Structure {
52
+ #if canImport(AppKit)
53
+ static var native: NSSomething
54
+ #else
55
+ static var native: UISomething
56
+ #endif
57
+ }
58
+ struct Structure {
59
+ #if canImport(AppKit)
60
+ #if swift(>=4.0)
61
+ static var native: NSSomething
62
+ #else
63
+ static var deprecated_native: NSSomething
64
+ #endif
65
+ #else
66
+ #if swift(>=4.0)
67
+ static var native: UISomething
68
+ #else
69
+ static var deprecated_native: UISomething
70
+ #endif
71
+ #endif
72
+ }
73
+ struct Structure {
74
+ #if canImport(AppKit)
75
+ #if swift(>=4.0)
76
+ static var native: NSSomething
77
+ #else
78
+ static var deprecated_native: NSSomething
79
+ #endif
80
+ #else
81
+ #if swift(>=4.0)
82
+ static var native: UISomething
83
+ #else
84
+ var deprecated_native: UISomething
85
+ #endif
86
+ #endif
87
+ }
30
88
""" ,
31
89
expected: """
32
90
enum A {
@@ -46,6 +104,64 @@ public class UseEnumForNamespacingTests: DiagnosingTestCase {
46
104
final class E {
47
105
static let a = 123
48
106
}
107
+ struct Structure {
108
+ #if canImport(AppKit)
109
+ var native: NSSomething
110
+ #elseif canImport(UIKit)
111
+ var native: UISomething
112
+ #endif
113
+ }
114
+ enum Structure {
115
+ #if canImport(AppKit)
116
+ static var native: NSSomething
117
+ #elseif canImport(UIKit)
118
+ static var native: UISomething
119
+ #endif
120
+ }
121
+ struct Structure {
122
+ #if canImport(AppKit)
123
+ var native: NSSomething
124
+ #elseif canImport(UIKit)
125
+ static var native: UISomething
126
+ #endif
127
+ }
128
+ enum Structure {
129
+ #if canImport(AppKit)
130
+ static var native: NSSomething
131
+ #else
132
+ static var native: UISomething
133
+ #endif
134
+ }
135
+ enum Structure {
136
+ #if canImport(AppKit)
137
+ #if swift(>=4.0)
138
+ static var native: NSSomething
139
+ #else
140
+ static var deprecated_native: NSSomething
141
+ #endif
142
+ #else
143
+ #if swift(>=4.0)
144
+ static var native: UISomething
145
+ #else
146
+ static var deprecated_native: UISomething
147
+ #endif
148
+ #endif
149
+ }
150
+ struct Structure {
151
+ #if canImport(AppKit)
152
+ #if swift(>=4.0)
153
+ static var native: NSSomething
154
+ #else
155
+ static var deprecated_native: NSSomething
156
+ #endif
157
+ #else
158
+ #if swift(>=4.0)
159
+ static var native: UISomething
160
+ #else
161
+ var deprecated_native: UISomething
162
+ #endif
163
+ #endif
164
+ }
49
165
""" )
50
166
}
51
167
}
0 commit comments