|
10 | 10 | // RUN: -emit-module-interface-path %t/Dep.swiftinterface \
|
11 | 11 | // RUN: -emit-private-module-interface-path %t/Dep.private.swiftinterface
|
12 | 12 |
|
13 |
| -// TEST Dep private interface should contain the package name |
14 |
| -// RUN: %target-swift-typecheck-module-from-interface(%t/Dep.private.swiftinterface) -module-name Dep -I %t |
15 |
| -// RUN: %FileCheck %s --check-prefix=CHECK-DEP-PRIVATE < %t/Dep.private.swiftinterface |
16 |
| -// CHECK-DEP-PRIVATE: -package-name myPkg |
17 |
| - |
18 | 13 | // TEST Dep.swiftmodule should contain package name and package symbols
|
19 | 14 | // RUN: llvm-bcanalyzer --dump %t/Dep.swiftmodule | %FileCheck %s --check-prefix=CHECK-DEP-BC
|
20 |
| -// CHECK-DEP-BC: <MODULE_PACKAGE_NAME abbrevid=6/> blob data = 'myPkg' |
| 15 | +// CHECK-DEP-BC: <MODULE_PACKAGE_NAME {{.*}}> blob data = 'myPkg' |
21 | 16 |
|
22 | 17 | // TEST Lib should load Dep.swiftmodule and access package decls if in the same package and error if not
|
23 | 18 | // RUN: %target-swift-frontend -typecheck %t/Lib.swift -package-name myPkg -I %t
|
|
39 | 34 | // RUN: -module-name Dep -I %t \
|
40 | 35 | // RUN: -o %t/Dep.swiftmodule
|
41 | 36 |
|
42 |
| -// TEST Dep binary built from interface should contain package name but no package symbols |
| 37 | +// TEST Dep binary built from interface should not contain package name or package symbols. |
43 | 38 | // RUN: llvm-bcanalyzer --dump %t/Dep.swiftmodule | %FileCheck %s --check-prefix=CHECK-DEP-INTER-BC
|
44 |
| -// CHECK-DEP-INTER-BC: <MODULE_PACKAGE_NAME abbrevid=7/> blob data = 'myPkg' |
| 39 | +// CHECK-DEP-INTER-BC-NOT: <MODULE_PACKAGE_NAME {{.*}}> blob data = 'myPkg' |
45 | 40 |
|
46 | 41 | // TEST Lib should error on loading Dep built from interface and accessing package symbols (unless usableFromInline or inlinable)
|
47 | 42 | // RUN: %target-swift-frontend -typecheck %t/Lib.swift -package-name myPkg -I %t -verify
|
@@ -109,16 +104,16 @@ public func publicFuncInlinable() {
|
109 | 104 | }
|
110 | 105 |
|
111 | 106 | //--- Lib.swift
|
112 |
| -import Dep // expected-error {{module 'Dep' is in package 'myPkg' but was built from a non-package interface; modules of the same package can only be loaded if built from source or package interface}} |
| 107 | +import Dep |
113 | 108 |
|
114 | 109 | public func libFunc() {
|
115 | 110 | publicFuncInlinable()
|
116 | 111 | publicFunc()
|
117 |
| - packageFuncInlinable() |
| 112 | + packageFuncInlinable() // expected-error {{cannot find 'packageFuncInlinable' in scope; did you mean 'publicFuncInlinable'?}} |
118 | 113 | packageFunc() // expected-error {{cannot find 'packageFunc' in scope}}
|
119 |
| - let x = PackageKlassUFI() |
| 114 | + let x = PackageKlassUFI() // expected-error {{cannot find 'PackageKlassUFI' in scope}} |
120 | 115 | let y = x.packageVarUFI
|
121 |
| - let z = x.packageVar // expected-error {{value of type 'PackageKlassUFI' has no member 'packageVar'}} |
| 116 | + let z = x.packageVar |
122 | 117 | print(x, y, z)
|
123 | 118 | }
|
124 | 119 |
|
|
0 commit comments