mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
29 lines
1.5 KiB
Swift
29 lines
1.5 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
|
|
/// Build the libraries.
|
|
// RUN: %target-swift-frontend -emit-module %t/PublicLib.swift -o %t
|
|
// RUN: %target-swift-frontend -emit-module %t/PackageLib.swift -o %t
|
|
// RUN: %target-swift-frontend -emit-module %t/InternalLib.swift -o %t
|
|
// RUN: %target-swift-frontend -emit-module %t/FileprivateLib.swift -o %t
|
|
// RUN: %target-swift-frontend -emit-module %t/PrivateLib.swift -o %t
|
|
|
|
/// Check flag requirement, without and with the flag.
|
|
// RUN: %target-swift-frontend -typecheck %t/ClientWithoutTheFlag.swift -I %t -verify
|
|
// RUN: %target-swift-frontend -typecheck %t/ClientWithoutTheFlag.swift -I %t \
|
|
// RUN: -enable-experimental-feature AccessLevelOnImport
|
|
// REQUIRES: asserts
|
|
|
|
//--- PublicLib.swift
|
|
//--- PackageLib.swift
|
|
//--- InternalLib.swift
|
|
//--- FileprivateLib.swift
|
|
//--- PrivateLib.swift
|
|
|
|
//--- ClientWithoutTheFlag.swift
|
|
public import PublicLib // expected-error@:1 {{Access level on imports require '-enable-experimental-feature AccessLevelOnImport'}}
|
|
package import PackageLib // expected-error@:1 {{Access level on imports require '-enable-experimental-feature AccessLevelOnImport'}}
|
|
internal import InternalLib // expected-error@:1 {{Access level on imports require '-enable-experimental-feature AccessLevelOnImport'}}
|
|
fileprivate import FileprivateLib // expected-error@:1 {{Access level on imports require '-enable-experimental-feature AccessLevelOnImport'}}
|
|
private import PrivateLib // expected-error@:1 {{Access level on imports require '-enable-experimental-feature AccessLevelOnImport'}}
|