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/Availability/spi-available-context.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,6 @@ public class Bar {
18
18
19
19
@available(macOS 10.10, iOS 8.0,*)
20
20
publicclassBaz{
21
-
publicvarmacos:MacOSSPIProto? // expected-error {{cannot use protocol 'MacOSSPIProto' here; it is SPI}}
21
+
publicvarmacos:MacOSSPIProto? // expected-error {{cannot use protocol 'MacOSSPIProto' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; it is SPI}}
Copy file name to clipboardExpand all lines: test/Availability/spi-available-swift-module.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,6 @@ import Foo
21
21
22
22
@available(macOS 10.10, iOS 8.0,*)
23
23
publicstructFoo{
24
-
publicvarmacos:MacOSSPIClass // expected-error {{cannot use class 'MacOSSPIClass' here; it is an SPI imported from 'Foo'}}
24
+
publicvarmacos:MacOSSPIClass // expected-error {{cannot use class 'MacOSSPIClass' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; it is an SPI imported from 'Foo'}}
Copy file name to clipboardExpand all lines: test/ClangImporter/availability_spi_as_unavailable.swift
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,8 @@ import SPIContainer
9
9
@_spi(a)publicleta:SPIInterface1=.init()
10
10
@_spi(a)publicletb:SPIInterface2=.init()
11
11
12
-
publicletc:SPIInterface1=.init() // expected-error{{cannot use class 'SPIInterface1' here; it is an SPI imported from 'SPIContainer'}}
13
-
publicletd:SPIInterface2=.init() // expected-error{{cannot use class 'SPIInterface2' here; it is an SPI imported from 'SPIContainer'}}
12
+
publicletc:SPIInterface1=.init() // expected-error{{cannot use class 'SPIInterface1' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; it is an SPI imported from 'SPIContainer'}}
13
+
publicletd:SPIInterface2=.init() // expected-error{{cannot use class 'SPIInterface2' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; it is an SPI imported from 'SPIContainer'}}
14
14
15
15
@inlinable
16
16
publicfunc inlinableUsingSPI(){
@@ -21,7 +21,7 @@ public func inlinableUsingSPI() {
21
21
publiclete:SPIInterface2=.init()
22
22
23
23
@available(iOS, unavailable)
24
-
publicletf:SPIInterface2=.init() // expected-error{{cannot use class 'SPIInterface2' here; it is an SPI imported from 'SPIContainer'}}
24
+
publicletf:SPIInterface2=.init() // expected-error{{cannot use class 'SPIInterface2' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; it is an SPI imported from 'SPIContainer'}}
Copy file name to clipboardExpand all lines: test/ClangImporter/availability_spi_as_unavailable_bridging_header.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,8 @@
5
5
@_spi(a)publicleta:SPIInterface1
6
6
@_spi(a)publicletb:SPIInterface2
7
7
8
-
publicletc:SPIInterface1 // expected-error{{cannot use class 'SPIInterface1' here; it is an SPI imported from '__ObjC'}}
9
-
publicletd:SPIInterface2 // expected-error{{cannot use class 'SPIInterface2' here; it is an SPI imported from '__ObjC'}}
8
+
publicletc:SPIInterface1 // expected-error{{cannot use class 'SPIInterface1' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; it is an SPI imported from '__ObjC'}}
9
+
publicletd:SPIInterface2 // expected-error{{cannot use class 'SPIInterface2' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; it is an SPI imported from '__ObjC'}}
10
10
11
11
@inlinable
12
12
publicfunc inlinableUsingSPI(){ // expected-warning{{public declarations should have an availability attribute with an introduction version}}
Copy file name to clipboardExpand all lines: test/ClangImporter/availability_spi_transitive.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,4 +5,4 @@ import SPIContainerImporter
5
5
6
6
@_spi(a)publicleta:SPIInterface1
7
7
8
-
publicletc:SPIInterface1 // expected-error{{cannot use class 'SPIInterface1' here; it is an SPI imported from 'SPIContainer'}}
8
+
publicletc:SPIInterface1 // expected-error{{cannot use class 'SPIInterface1' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; it is an SPI imported from 'SPIContainer'}}
Copy file name to clipboardExpand all lines: test/SPI/implementation_only_spi_import_exposability.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -34,8 +34,8 @@ public protocol IOIProtocol {}
34
34
35
35
publicstructPublicStruct:IOIProtocol,SPIProtocol{ // expected-error {{cannot use protocol 'IOIProtocol' in a public or '@usableFromInline' conformance; 'Lib' has been imported as implementation-only}}
36
36
// expected-error @-1 {{cannot use protocol 'SPIProtocol' in a public or '@usableFromInline' conformance; 'Lib' has been imported as implementation-only}}
37
-
publicvarspiStruct=SPIStruct() // expected-error {{cannot use struct 'SPIStruct' here; 'Lib' has been imported as implementation-only}}
38
-
publicvarioiStruct=IOIStruct() // expected-error {{cannot use struct 'IOIStruct' here; 'Lib' has been imported as implementation-only}}
37
+
publicvarspiStruct=SPIStruct() // expected-error {{cannot use struct 'SPIStruct' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; 'Lib' has been imported as implementation-only}}
38
+
publicvarioiStruct=IOIStruct() // expected-error {{cannot use struct 'IOIStruct' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; 'Lib' has been imported as implementation-only}}
0 commit comments