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/implementation_only_spi_import_exposability.swift
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -32,8 +32,8 @@ public protocol IOIProtocol {}
32
32
@_spi(B)publicfunc leakSPIStruct(_ a:SPIStruct)->SPIStruct{fatalError()} // expected-warning 2 {{cannot use struct 'SPIStruct' here; 'Lib' has been imported as implementation-only}}
33
33
@_spi(B)publicfunc leakIOIStruct(_ a:IOIStruct)->IOIStruct{fatalError()} // expected-warning 2 {{cannot use struct 'IOIStruct' here; 'Lib' has been imported as implementation-only}}
34
34
35
-
publicstructPublicStruct:IOIProtocol,SPIProtocol{ // expected-error {{cannot use protocol 'IOIProtocol' here; 'Lib' has been imported as implementation-only}}
36
-
// expected-error @-1 {{cannot use protocol 'SPIProtocol' here; 'Lib' has been imported as implementation-only}}
35
+
publicstructPublicStruct:IOIProtocol,SPIProtocol{ // expected-error {{cannot use protocol 'IOIProtocol' in an exported conformance; 'Lib' has been imported as implementation-only}}
36
+
// expected-error @-1 {{cannot use protocol 'SPIProtocol' in an exported conformance; 'Lib' has been imported as implementation-only}}
37
37
publicvarspiStruct=SPIStruct() // expected-error {{cannot use struct 'SPIStruct' here; 'Lib' has been imported as implementation-only}}
38
38
publicvarioiStruct=IOIStruct() // expected-error {{cannot use struct 'IOIStruct' here; 'Lib' has been imported as implementation-only}}
publicstructLocalSPIStruct:IOIProtocol,SPIProtocol{ // expected-warning {{cannot use protocol 'IOIProtocol' here; 'Lib' has been imported as implementation-only}}
53
-
// expected-warning @-1 {{cannot use protocol 'SPIProtocol' here; 'Lib' has been imported as implementation-only}}
52
+
publicstructLocalSPIStruct:IOIProtocol,SPIProtocol{ // expected-warning {{cannot use protocol 'IOIProtocol' in an exported conformance; 'Lib' has been imported as implementation-only}}
53
+
// expected-warning @-1 {{cannot use protocol 'SPIProtocol' in an exported conformance; 'Lib' has been imported as implementation-only}}
@_spi(S)publicclassBadSubclass:InternalClass{} // expected-error{{class cannot be declared public because its superclass is internal}}
72
72
@_spi(S)publicclassOkSPISubclass:SPIClass{} // OK
73
-
publicclassBadPublicClass:SPIClass{} // expected-error {{cannot use class 'SPIClass' here; it is SPI}}
73
+
publicclassBadPublicClass:SPIClass{} // expected-error {{cannot use class 'SPIClass' in an exported conformance; it is SPI}}
74
74
@_spi(S)publicclassBadSPIClass:PrivateClass{} // expected-error {{class cannot be declared public because its superclass is private}}
75
75
76
76
@_spi(s)publicfunc genFunc<T:PrivateProtocol>(_ t:T){} // expected-error {{global function cannot be declared public because its generic parameter uses a private type}}
Copy file name to clipboardExpand all lines: test/Sema/access-level-import-typealias.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ public typealias ClazzAlias = Clazz
24
24
publicimport Aliases
25
25
internalimport Original // expected-note 2 {{class 'Clazz' imported as 'internal' from 'Original' here}}
26
26
27
-
// expected-error@+1 {{'ClazzAlias' aliases 'Original.Clazz' and cannot be used for a conformance on a public, package or '@usableFromInline' type because 'Original' was not imported publicly}}
27
+
// expected-error@+1 {{'ClazzAlias' aliases 'Original.Clazz' and cannot be used in a publicor '@usableFromInline' conformance because 'Original' was not imported publicly}}
Copy file name to clipboardExpand all lines: test/Sema/missing-import-typealias-swift6.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,6 @@ public typealias ClazzAlias = Clazz
28
28
29
29
publicimport Aliases
30
30
31
-
// expected-error@+1 {{'ClazzAlias' aliases 'Original.Clazz' and cannot be used here because 'Original' was not imported by this file}}
31
+
// expected-error@+1 {{'ClazzAlias' aliases 'Original.Clazz' and cannot be used in a public or '@usableFromInline' conformance because 'Original' was not imported by this file}}
Copy file name to clipboardExpand all lines: test/Sema/missing-import-typealias.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ import Aliases
66
66
67
67
// CHECK-NON-RESILIENT-NOT: was not imported by this file
68
68
69
-
// expected-warning@+2 {{'ClazzAlias' aliases 'Original.Clazz' and cannot be used here because 'Original' was not imported by this file; this is an error in the Swift 6 language mode}}
69
+
// expected-warning@+2 {{'ClazzAlias' aliases 'Original.Clazz' and cannot be used in a public or '@usableFromInline' conformance because 'Original' was not imported by this file; this is an error in the Swift 6 language mode}}
70
70
// expected-note@+1 {{The missing import of module 'Original' will be added implicitly}}
Copy file name to clipboardExpand all lines: test/Sema/spi-available-local.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ public class MacOSSPIClass {} // expected-note {{type declared here}}
10
10
publicclassiOSSPIClass{}
11
11
12
12
@available(macOS 10.10, iOS 8.0,*)
13
-
publicclassMacOSDerived:MacOSSPIClass{} // expected-error {{cannot use class 'MacOSSPIClass' here; it is SPI}}
13
+
publicclassMacOSDerived:MacOSSPIClass{} // expected-error {{cannot use class 'MacOSSPIClass' in a public or '@usableFromInline' conformance; it is SPI}}
publicstructTestConformance:BadProto{} // expected-error {{cannot use protocol 'BadProto' here; it is SPI}}
49
+
publicstructTestConformance:BadProto{} // expected-error {{cannot use protocol 'BadProto' in a public or '@usableFromInline' conformance; it is SPI}}
50
50
51
-
@usableFromInlinestructTestConformanceUFI:BadProto{} // expected-error {{cannot use protocol 'BadProto' here; it is SPI}}
51
+
@usableFromInlinestructTestConformanceUFI:BadProto{} // expected-error {{cannot use protocol 'BadProto' in a public or '@usableFromInline' conformance; it is SPI}}
52
52
53
53
structTestConformanceOkay:BadProto{} // ok
54
54
55
-
publicclassTestConformanceClass:BadProto{} // expected-error {{cannot use protocol 'BadProto' here; it is SPI}}
56
-
publicenumTestConformanceEnum:BadProto{} // expected-error {{cannot use protocol 'BadProto' here; it is SPI}}
55
+
publicclassTestConformanceClass:BadProto{} // expected-error {{cannot use protocol 'BadProto' in a public or '@usableFromInline' conformance; it is SPI}}
56
+
publicenumTestConformanceEnum:BadProto{} // expected-error {{cannot use protocol 'BadProto' in a public or '@usableFromInline' conformance; it is SPI}}
57
57
58
58
59
59
publicstructTestGenericParams<T:BadProto>{} // expected-error {{cannot use protocol 'BadProto' here; it is SPI}}
@@ -105,11 +105,11 @@ public protocol TestAssocTypeWhereClause {
105
105
associatedtypeAssoc:Collectionwhere Assoc.Element:BadProto // expected-error {{cannot use protocol 'BadProto' here; it is SPI}}
106
106
}
107
107
108
-
publicenumTestRawType:IntLike{ // expected-error {{cannot use struct 'IntLike' here; it is SPI}}
108
+
publicenumTestRawType:IntLike{ // expected-error {{cannot use struct 'IntLike' in a public or '@usableFromInline' conformance; it is SPI}}
109
109
case x =1
110
110
}
111
111
112
-
publicclassTestSubclass:BadClass{ // expected-error {{cannot use class 'BadClass' here; it is SPI}}
112
+
publicclassTestSubclass:BadClass{ // expected-error {{cannot use class 'BadClass' in a public or '@usableFromInline' conformance; it is SPI}}
113
113
}
114
114
115
115
publictypealiasTestUnderlying=BadStruct // expected-error {{cannot use struct 'BadStruct' here; it is SPI}}
@@ -150,7 +150,7 @@ extension Array where Element == BadStruct {
150
150
subscript(okay _:Int)->Int{0} // okay
151
151
}
152
152
153
-
extensionInt:BadProto{} // expected-error {{cannot use protocol 'BadProto' here; it is SPI}}
153
+
extensionInt:BadProto{} // expected-error {{cannot use protocol 'BadProto' in a public or '@usableFromInline' conformance; it is SPI}}
0 commit comments