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
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,8 @@ public protocol IOIProtocol {}
26
26
27
27
@_spi(A)@_implementationOnlyimport Lib
28
28
29
-
@_spi(B)publicfunc leakSPIStruct(_ a:SPIStruct)->SPIStruct{fatalError()} // expected-error 2 {{cannot use struct 'SPIStruct' here; 'Lib' has been imported as implementation-only}}
30
-
@_spi(B)publicfunc leakIOIStruct(_ a:IOIStruct)->IOIStruct{fatalError()} // expected-error 2 {{cannot use struct 'IOIStruct' here; 'Lib' has been imported as implementation-only}}
29
+
@_spi(B)publicfunc leakSPIStruct(_ a:SPIStruct)->SPIStruct{fatalError()} // expected-warning 2 {{cannot use struct 'SPIStruct' in SPI; 'Lib' has been imported as implementation-only}}
30
+
@_spi(B)publicfunc leakIOIStruct(_ a:IOIStruct)->IOIStruct{fatalError()} // expected-warning 2 {{cannot use struct 'IOIStruct' in SPI; 'Lib' has been imported as implementation-only}}
31
31
32
32
publicstructPublicStruct:IOIProtocol,SPIProtocol{ // expected-error {{cannot use protocol 'IOIProtocol' here; 'Lib' has been imported as implementation-only}}
33
33
// expected-error @-1 {{cannot use protocol 'SPIProtocol' here; 'Lib' has been imported as implementation-only}}
publicstructLocalSPIStruct:IOIProtocol,SPIProtocol{ // expected-warning {{cannot use protocol 'IOIProtocol' in SPI; 'Lib' has been imported as implementation-only}}
48
+
// expected-warning @-1 {{cannot use protocol 'SPIProtocol' in SPI; 'Lib' has been imported as implementation-only}}
0 commit comments