Skip to content

Commit 44ea219

Browse files
committed
[ModuleInterface] Test that we accept package import in swiftinterfaces
1 parent 3496a74 commit 44ea219

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

test/Sema/access-level-import-flag-check.swift

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
// RUN: split-file %s %t
33

44
/// 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
1015

1116
/// Check flag requirement, without and with the flag.
1217
// RUN: %target-swift-frontend -typecheck %t/ClientWithoutTheFlag.swift -I %t -verify \
@@ -17,7 +22,7 @@
1722
// REQUIRES: asserts
1823

1924
/// swiftinterfaces don't need the flag.
20-
// RUN: %target-swift-typecheck-module-from-interface(%t/Client.swiftinterface)
25+
// RUN: %target-swift-typecheck-module-from-interface(%t/Client.swiftinterface) -I %t
2126

2227
//--- PublicLib.swift
2328
//--- PackageLib.swift
@@ -34,5 +39,6 @@ private import PrivateLib // expected-error@:1 {{Access level on imports require
3439

3540
//--- Client.swiftinterface
3641
// swift-interface-format-version: 1.0
37-
// swift-module-flags: -enable-library-evolution
42+
// swift-module-flags: -enable-library-evolution -package-name MyPackage
3843
public import Swift
44+
package import PackageLib

0 commit comments

Comments
 (0)