2
2
// RUN: split-file %s %t
3
3
4
4
/// Build the libraries.
5
- // RUN: %target-swift-frontend -emit-module %t/PublicLib.swift -o %t
6
- // RUN: %target-swift-frontend -emit-module %t/PackageLib.swift -o %t
7
- // RUN: %target-swift-frontend -emit-module %t/InternalLib.swift -o %t
8
- // RUN: %target-swift-frontend -emit-module %t/FileprivateLib.swift -o %t
9
- // RUN: %target-swift-frontend -emit-module %t/PrivateLib.swift -o %t
5
+ // RUN: %target-swift-frontend -emit-module %t/PublicLib.swift -o %t \
6
+ // RUN: -enable-library-evolution
7
+ // RUN: %target-swift-frontend -emit-module %t/PackageLib.swift -o %t \
8
+ // RUN: -enable-library-evolution
9
+ // RUN: %target-swift-frontend -emit-module %t/InternalLib.swift -o %t \
10
+ // RUN: -enable-library-evolution
11
+ // RUN: %target-swift-frontend -emit-module %t/FileprivateLib.swift -o %t \
12
+ // RUN: -enable-library-evolution
13
+ // RUN: %target-swift-frontend -emit-module %t/PrivateLib.swift -o %t \
14
+ // RUN: -enable-library-evolution
10
15
11
16
/// Check flag requirement, without and with the flag.
12
17
// RUN: %target-swift-frontend -typecheck %t/ClientWithoutTheFlag.swift -I %t -verify \
16
21
// RUN: -package-name package
17
22
// REQUIRES: asserts
18
23
24
+ /// swiftinterfaces don't need the flag.
25
+ // RUN: %target-swift-typecheck-module-from-interface(%t/Client.swiftinterface) -I %t
26
+
19
27
//--- PublicLib.swift
20
28
//--- PackageLib.swift
21
29
//--- InternalLib.swift
@@ -28,3 +36,12 @@ package import PackageLib // expected-error@:1 {{Access level on imports require
28
36
internal import InternalLib // expected-error@:1 {{Access level on imports require '-enable-experimental-feature AccessLevelOnImport'}}
29
37
fileprivate import FileprivateLib // expected-error@:1 {{Access level on imports require '-enable-experimental-feature AccessLevelOnImport'}}
30
38
private import PrivateLib // expected-error@:1 {{Access level on imports require '-enable-experimental-feature AccessLevelOnImport'}}
39
+
40
+ //--- Client.swiftinterface
41
+ // swift-interface-format-version: 1.0
42
+ // swift-module-flags: -enable-library-evolution -package-name MyPackage
43
+ public import PublicLib
44
+ package import PackageLib
45
+ internal import InternalLib
46
+ fileprivate import FileprivateLib
47
+ private import PrivateLib
0 commit comments