Skip to content

Commit e20b0f8

Browse files
committed
Minor fixes
1 parent 53c4393 commit e20b0f8

6 files changed

+56
-56
lines changed

test/Interop/C/implementation-only-imports/lookup-visible-symbols-recursively-inversed.swift renamed to test/Interop/C/implementation-only-imports/lookup-visible-decls-recursively-inversed.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
// RUN: %target-swift-frontend -typecheck -swift-version 5 -I %t/use_module_a -I %t/use_module_b -I %S/Inputs -enable-cxx-interop %s
77

88

9-
// If a symbol comes from two modules, one of which is marked as
9+
// If a decl comes from two modules, one of which is marked as
1010
// @_implementationOnly, Swift may choose the @_implementationOnly source
11-
// and then error out due to the symbol being hidden.
11+
// and then error out due to the decl being hidden.
1212

13-
// Swift should consider all sources for the symbol and recognize that the
14-
// symbol is not hidden behind @_implementationOnly in all modules.
13+
// Swift should consider all sources for the decl and recognize that the
14+
// decl is not hidden behind @_implementationOnly in all modules.
1515

16-
// This test, as well as the `lookup-visible-symbols-recursively.swift` check
17-
// that the `getFortyTwo` symbol can be found when at least one of the
16+
// This test, as well as `lookup-visible-decls-recursively.swift` checks
17+
// that the `getFortyTwo` decl can be found when at least one of the
1818
// modules is not `@_implementationOnly`.
1919

2020
@_implementationOnly import UseModuleA

test/Interop/C/implementation-only-imports/lookup-visible-symbols-recursively.swift renamed to test/Interop/C/implementation-only-imports/lookup-visible-decls-recursively.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
// RUN: %target-swift-frontend -typecheck -swift-version 5 -I %t/use_module_a -I %t/use_module_b -I %S/Inputs -enable-cxx-interop %s
77

88

9-
// If a symbol comes from two modules, one of which is marked as
9+
// If a decl comes from two modules, one of which is marked as
1010
// @_implementationOnly, Swift may choose the @_implementationOnly source
11-
// and then error out due to the symbol being hidden.
11+
// and then error out due to the decl being hidden.
1212

13-
// Swift should consider all sources for the symbol and recognize that the
14-
// symbol is not hidden behind @_implementationOnly in all modules.
13+
// Swift should consider all sources for the decl and recognize that the
14+
// decl is not hidden behind @_implementationOnly in all modules.
1515

16-
// This test, as well as the `lookup-visible-symbols-recursively-inversed.swift
17-
// check that the `getFortyTwo` symbol can be found when at least one of the
16+
// This test, as well as `lookup-visible-decls-recursively-inversed.swift`
17+
// checks that the `getFortyTwo` decl can be found when at least one of the
1818
// modules is not `@_implementationOnly`.
1919

2020
import UseModuleA
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend -emit-module -o %t/FortyTwo.swiftmodule -I %S/Inputs %s
3+
4+
// If a decl comes from two modules, one of which is marked as
5+
// @_implementationOnly, Swift may choose the @_implementationOnly source
6+
// and then error out due to the decl being hidden.
7+
8+
// Swift should consider all sources for the decl and recognize that the
9+
// decl is not hidden behind @_implementationOnly in all modules.
10+
11+
// This test, as well as
12+
// `prefer-a-visible-decl-over-implementation-only-decls.swift`
13+
// checks that the `getFortyTwo` decl can be found when at least one of the
14+
// modules is not `@_implementationOnly`.
15+
16+
import UserA
17+
@_implementationOnly import UserB
18+
19+
@_inlineable
20+
public func callFortyTwo() -> CInt {
21+
return getFortyTwo()
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend -emit-module -o %t/FortyTwo.swiftmodule -I %S/Inputs %s
3+
4+
// If a decl comes from two modules, one of which is marked as
5+
// @_implementationOnly, Swift may choose the @_implementationOnly source
6+
// and then error out due to the decl being hidden.
7+
8+
// Swift should consider all sources for the decl and recognize that the
9+
// decl is not hidden behind @_implementationOnly in all modules.
10+
11+
// This test, as well as
12+
// `prefer-a-visible-decl-over-implementation-only-decls-inversed.swift`
13+
// checks that the `getFortyTwo` decl can be found when at least one of the
14+
// modules is not `@_implementationOnly`.
15+
16+
@_implementationOnly import UserA
17+
import UserB
18+
19+
@_inlineable
20+
public func callFortyTwo() -> CInt {
21+
return getFortyTwo()
22+
}

test/Interop/C/implementation-only-imports/prefer-a-visible-symbol-over-implementation-only-ones-inversed.swift

Lines changed: 0 additions & 22 deletions
This file was deleted.

test/Interop/C/implementation-only-imports/prefer-a-visible-symbol-over-implementation-only-ones.swift

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)