mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Replace the `here` part of the generic exportability diagnostic for variables with: `in a property declaration marked public or in a '@frozen' or '@usableFromInline' context`. The full diagnostic now looks like: ``` error: cannot use struct 'ImportedType' in a property declaration marked public or in a '@frozen' or '@usableFromInline' context; 'HiddenDependency' has been imported as implementation-only ``` This should be improved further to support implicitly exported memory layouts in non-library-evolution and embedded.
9 lines
426 B
Swift
9 lines
426 B
Swift
// REQUIRES: OS=macosx
|
|
// RUN: %target-swift-frontend -typecheck %s -F %S/Inputs/frameworks -verify -verify-ignore-unrelated -library-level api
|
|
|
|
import SPIContainerImporter
|
|
|
|
@_spi(a) public let a: SPIInterface1
|
|
|
|
public let c: 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'}}
|