File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public func genericFunc<T>(_ t: T) { print(t) }
13
13
14
14
@_spi ( HelperSPI) public func spiFunc( ) { print ( " spiFunc " ) }
15
15
16
- @_spi ( HelperSPI) public class SPIStruct {
16
+ @_spi ( HelperSPI) public struct SPIStruct {
17
17
@_spi ( HelperSPI) public init ( ) { print ( " SPIStruct.init " ) }
18
18
@_spi ( HelperSPI) public func spiMethod( ) { print ( " SPIStruct.spiMethod " ) }
19
19
@_spi ( HelperSPI) public var spiVar = " text "
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ c.spiMethod()
28
28
c. spiVar = " write "
29
29
print ( c. spiVar)
30
30
31
- let s = SPIStruct ( )
31
+ var s = SPIStruct ( )
32
32
s. spiMethod ( )
33
33
s. spiInherit ( )
34
34
s. spiDontInherit ( ) // expected-error {{'spiDontInherit' is inaccessible due to '@_spi' protection level}}
Original file line number Diff line number Diff line change 8
8
9
9
// Look for the SPI symbols in the IR
10
10
// CHECK-IR: define swiftcc void @"$s10spi_helper0A4FuncyyF"
11
- // CHECK-IR: define swiftcc void @"$s10spi_helper9SPIStructC0A6MethodyyF "
11
+ // CHECK-IR: define swiftcc void @"$s10spi_helper9SPIStructV0A6MethodyyF "
12
12
// CHECK-IR: define swiftcc void @"$s10spi_helper8SPIClassC0A6MethodyyF"
13
13
// CHECK-IR: define swiftcc void @"$s10spi_helper7SPIEnumO0A6MethodyyF"
14
14
// CHECK-IR: define swiftcc void @"$s10spi_helper12PublicStructV0A6MethodyyF"
22
22
// CHECK-TBD: _$s10spi_helper12otherApiFuncyyF
23
23
// CHECK-TBD: _$s10spi_helper7SPIEnumO0A6MethodyyF
24
24
// CHECK-TBD: _$s10spi_helper8SPIClassC0A6MethodyyF
25
- // CHECK-TBD: _$s10spi_helper9SPIStructC0A6MethodyyF
25
+ // CHECK-TBD: _$s10spi_helper9SPIStructV0A6MethodyyF
You can’t perform that action at this time.
0 commit comments