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
Copy file name to clipboardExpand all lines: test/SPI/spi-only-import-exportability.swift
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -150,6 +150,7 @@ public func implementationDetailsUser() {
150
150
publicstructClientStruct{
151
151
#if !SKIP_ERRORS
152
152
publicvara:SPIOnlyStruct // expected-error {{cannot use struct 'SPIOnlyStruct' here; 'SPIOnlyImportedLib' was imported for SPI only}}
153
+
// expected-error@+1 {{cannot use property 'wrappedValue' here; 'SPIOnlyImportedLib' was imported for SPI only}}
153
154
@SPIOnlyPropertyWrapper(42)publicvaraWrapped:Any // expected-error {{cannot use generic struct 'SPIOnlyPropertyWrapper' as property wrapper here; 'SPIOnlyImportedLib' was imported for SPI only}}
// expected-note@-1 2 {{generic struct 'FileprivateImportWrapper' imported as 'fileprivate' from 'FileprivateLib' here}}
89
89
// expected-note@-2 2 {{initializer 'init(wrappedValue:)' imported as 'fileprivate' from 'FileprivateLib' here}}
90
90
// expected-note@-3 2 {{protocol 'FileprivateImportProto' imported as 'fileprivate' from 'FileprivateLib' here}}
91
+
// expected-note@-4 2 {{property 'wrappedValue' imported as 'fileprivate' from 'FileprivateLib' here}}
91
92
92
93
privateimport PrivateLib
93
94
// expected-note@-1 10 {{struct 'PrivateImportType' imported as 'private' from 'PrivateLib' here}}
@@ -128,6 +129,7 @@ public struct GenericType<T, U> {}
128
129
129
130
@FileprivateImportWrapper // expected-error {{initializer 'init(wrappedValue:)' is fileprivate and cannot be referenced from an '@inlinable' function}}
130
131
// expected-error @-1 {{generic struct 'FileprivateImportWrapper' is fileprivate and cannot be referenced from an '@inlinable' function}}
132
+
// expected-error @-2 {{property 'wrappedValue' is fileprivate and cannot be referenced from an '@inlinable' function}}
131
133
varwrappedFileprivate:PublicImportType
132
134
133
135
let _:GenericType<PublicImportType,PublicImportType>
@@ -168,6 +170,7 @@ public struct GenericType<T, U> {}
168
170
169
171
@FileprivateImportWrapper // expected-error {{initializer 'init(wrappedValue:)' is fileprivate and cannot be referenced from an '@_alwaysEmitIntoClient' function}}
170
172
// expected-error @-1 {{generic struct 'FileprivateImportWrapper' is fileprivate and cannot be referenced from an '@_alwaysEmitIntoClient' function}}
173
+
// expected-error @-2 {{property 'wrappedValue' is fileprivate and cannot be referenced from an '@_alwaysEmitIntoClient' function}}
171
174
varwrappedFileprivate:PublicImportType
172
175
173
176
let _:GenericType<PublicImportType,PublicImportType>
Copy file name to clipboardExpand all lines: test/Sema/implementation-only-import-in-decls.swift
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,7 @@ public struct TestInit {
56
56
57
57
publicstructTestPropertyWrapper{
58
58
@BadWrapperpublicvarBadProperty:Int // expected-error {{cannot use struct 'BadWrapper' as property wrapper here; 'BADLibrary' has been imported as implementation-only}}
59
+
// expected-error@-1 {{cannot use property 'wrappedValue' here; 'BADLibrary' has been imported as implementation-only}}
59
60
}
60
61
61
62
publicprotocolTestInherited:BadProto{} // expected-error {{cannot use protocol 'BadProto' here; 'BADLibrary' has been imported as implementation-only}}
Copy file name to clipboardExpand all lines: test/Sema/missing-import-typealias.swift
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,7 @@ public class InheritsFromClazzAlias: ClazzAlias {}
81
81
publicfunc takesGeneric<T:ProtoAlias>(_ t:T){}
82
82
83
83
publicstructHasMembers{
84
+
// expected-warning@+3 {{cannot use property 'wrappedValue' here; 'Original' was not imported by this file}}
84
85
// expected-warning@+2 {{'WrapperAlias' aliases 'Original.Wrapper' and cannot be used as property wrapper here because 'Original' was not imported by this file; this is an error in the Swift 6 language mode}}
85
86
// expected-note@+1 {{The missing import of module 'Original' will be added implicitly}}
0 commit comments