You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicinit(wrappedValue value:T){self.wrappedValue = value }
82
+
publicinit(_ value:T){self.wrappedValue = value }
83
+
}
84
+
61
85
//--- UnusedImport.swift
62
86
63
87
//--- UnusedPackageImport.swift
@@ -84,7 +108,11 @@ public import ConformanceBaseTypes
84
108
publicimport ConformanceDefinition
85
109
publicimport AliasesBase
86
110
publicimport Aliases
111
+
publicimport ExtensionA
112
+
publicimport ExtensionB
113
+
publicimport PropertyWrapper
87
114
115
+
/// Repeat some imports to make sure we report all of them.
88
116
publicimport UnusedImport // expected-warning {{public import of 'UnusedImport' was not used in public declarations or inlinable code}} {{1-8=}}
89
117
publicimport UnusedImport // expected-warning {{public import of 'UnusedImport' was not used in public declarations or inlinable code}} {{1-8=}}
90
118
packageimport UnusedImport // expected-warning {{package import of 'UnusedImport' was not used in package declarations}} {{1-9=}}
@@ -114,7 +142,7 @@ public func useConformance(_ a: any Proto = ConformingType()) {}
114
142
// expected-remark @-3 {{struct 'ConformingType' is imported via 'ConformanceBaseTypes'}}
115
143
// expected-remark @-4 {{initializer 'init()' is imported via 'ConformanceBaseTypes'}}
116
144
117
-
@usableFromInlineinternalfuncuseInDefaultValue(_ a:TypeUsedInSignature){} // expected-remark {{struct 'TypeUsedInSignature' is imported via 'DepUsedInSignature'}}
145
+
@usableFromInlineinternalfuncusableFromInlineFunc(_ a:TypeUsedInSignature){} // expected-remark {{struct 'TypeUsedInSignature' is imported via 'DepUsedInSignature'}}
118
146
119
147
@inlinable
120
148
publicfunc publicFuncUsesPrivate(){
@@ -139,6 +167,16 @@ public func publicFuncUsesPrivate() {
139
167
let _:ClazzAlias
140
168
// expected-remark @-1 {{type alias 'ClazzAlias' is imported via 'Aliases'}}
141
169
// expected-remark @-2 2 {{typealias underlying type class 'Clazz' is imported via 'AliasesBase'}}
170
+
171
+
letx=ConformingType()
172
+
// expected-remark @-1 {{struct 'ConformingType' is imported via 'ConformanceBaseTypes'}}
173
+
// expected-remark @-2 {{initializer 'init()' is imported via 'ConformanceBaseTypes'}}
174
+
x.extFuncA() // expected-remark {{instance method 'extFuncA()' is imported via 'ExtensionA'}}
175
+
x.extFuncB() // expected-remark {{instance method 'extFuncB()' is imported via 'ExtensionB'}}
176
+
}
177
+
178
+
publicstructStructUsingPropertyWrapper{
179
+
@MyPropertyWrapper(42)publicvarwrapped:Any // expected-remark 2 {{generic struct 'MyPropertyWrapper' is imported via 'PropertyWrapper'}}
142
180
}
143
181
144
182
publicstructStruct{ // expected-remark {{implicitly used struct 'Int' is imported via 'Swift'}}
0 commit comments