mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
These are tests that fail in the next commit without this flag. This does not add -verify-ignore-unrelated to all tests with -verify, only the ones that would fail without it. This is NFC since this flag is currently a no-op.
27 lines
795 B
Swift
27 lines
795 B
Swift
// REQUIRES: OS=macosx
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
|
|
// RUN: %target-swift-frontend -parse-as-library %t/Foo.swift -emit-module -library-level api -emit-module-path %t/Foo.swiftmodule -module-name Foo
|
|
// RUN: %target-swift-frontend-typecheck -parse-as-library %t/Client.swift -verify -verify-ignore-unrelated -library-level api -I %t
|
|
|
|
//--- Foo.swift
|
|
|
|
@_spi_available(macOS 10.10, *)
|
|
@available(iOS 8.0, *)
|
|
public class MacOSSPIClass {}
|
|
|
|
@_spi_available(iOS 8.0, *)
|
|
@available(macOS 10.10, *)
|
|
public class iOSSPIClass {}
|
|
|
|
//--- Client.swift
|
|
|
|
import Foo
|
|
|
|
@available(macOS 10.10, iOS 8.0, *)
|
|
public struct Foo {
|
|
public var macos: MacOSSPIClass // expected-error {{cannot use class 'MacOSSPIClass' here; it is an SPI imported from 'Foo'}}
|
|
public var ios: iOSSPIClass
|
|
}
|