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
@@ -31,13 +34,25 @@ func inlinable() -> SPIClass { // expected-error {{class 'SPIClass' is '@_spi' a
31
34
_ =SPIClass() // expected-error {{class 'SPIClass' is '@_spi' and cannot be referenced from an '@inlinable' function}}
32
35
}
33
36
34
-
@_spi(S)publicstructSPIStruct{} // expected-note 2 {{struct 'SPIStruct' is not '@usableFromInline' or public}}
37
+
@_spi(S)publicstructSPIStruct{ // expected-note 2 {{struct 'SPIStruct' is not '@usableFromInline' or public}}
38
+
publicinit(){}
39
+
}
35
40
36
41
@frozenpublicstructFrozenStruct{
37
42
@_spi(S)publicvarspiInFrozen=SPIStruct() // expected-error {{struct 'SPIStruct' is '@_spi' and cannot be referenced from a property initializer in a '@frozen' type}}
38
43
// expected-error @-1 {{stored property 'spiInFrozen' cannot be declared '@_spi' in a '@frozen' struct}}
39
44
40
-
varasdf=SPIStruct() // expected-error {{struct 'SPIStruct' is '@_spi' and cannot be referenced from a property initializer in a '@frozen' type}}
45
+
varspiTypeInFrozen=SPIStruct() // expected-error {{struct 'SPIStruct' is '@_spi' and cannot be referenced from a property initializer in a '@frozen' type}}
46
+
privatevarspiTypeInFrozen1:SPIClass // expected-error {{cannot use class 'SPIClass' here; it is SPI}}
0 commit comments