Skip to content

Commit 741d1bf

Browse files
committed
test: add an attribute test
1 parent 1395af1 commit 741d1bf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/attr/spi_available.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// RUN: %target-typecheck-verify-swift
2+
3+
@_spi_available(*, deprecated, renamed: "another") // expected-error {{SPI available only supports introducing version on specific platform}}
4+
public class SPIClass1 {}
5+
6+
@_spi_available(*, unavailable) // expected-error {{SPI available only supports introducing version on specific platform}}
7+
public class SPIClass2 {}
8+
9+
@_spi_available(AlienPlatform 5.2, *) // expected-warning {{unrecognized platform name 'AlienPlatform'}}
10+
public class SPIClass3 {}

0 commit comments

Comments
 (0)