Skip to content

Commit 17fd275

Browse files
committed
stdlib: Adopt internal imports to suppress some warnings in tests.
1 parent 5ab0385 commit 17fd275

File tree

5 files changed

+30
-29
lines changed

5 files changed

+30
-29
lines changed

stdlib/private/StdlibUnittest/RaceTest.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ import SwiftPrivate
4040
import SwiftPrivateLibcExtras
4141
import SwiftPrivateThreadExtras
4242
#if canImport(Darwin)
43-
import Darwin
43+
internal import Darwin
4444
#elseif canImport(Glibc)
45-
import Glibc
45+
internal import Glibc
4646
#elseif canImport(Musl)
47-
import Musl
47+
internal import Musl
4848
#elseif canImport(Android)
49-
import Android
49+
internal import Android
5050
#elseif os(WASI)
51-
import WASILibc
51+
internal import WASILibc
5252
#elseif os(Windows)
53-
import CRT
54-
import WinSDK
53+
internal import CRT
54+
internal import WinSDK
5555
#endif
5656

5757
#if _runtime(_ObjC)
58-
import ObjectiveC
58+
internal import ObjectiveC
5959
#else
6060
func autoreleasepool(invoking code: () -> Void) {
6161
// Native runtime does not have autorelease pools. Execute the code

stdlib/private/StdlibUnittest/StdlibCoreExtras.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313
import SwiftPrivate
1414
import SwiftPrivateLibcExtras
1515
#if canImport(Darwin)
16-
import Darwin
16+
internal import Darwin
1717
#elseif canImport(Glibc)
18-
import Glibc
18+
internal import Glibc
1919
#elseif canImport(Musl)
20-
import Musl
20+
internal import Musl
2121
#elseif canImport(Android)
22-
import Android
22+
internal import Android
2323
#elseif os(WASI)
24-
import WASILibc
24+
internal import WASILibc
2525
#elseif os(Windows)
26-
import CRT
26+
internal import CRT
2727
#endif
2828

2929
#if _runtime(_ObjC)
30-
import Foundation
30+
internal import Foundation
3131
#endif
3232

3333
//

stdlib/private/StdlibUnittest/StdlibUnittest.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ import SwiftPrivateLibcExtras
1717

1818
#if canImport(Darwin)
1919
#if _runtime(_ObjC)
20-
import Foundation
20+
internal import Foundation
2121
#endif
22-
import Darwin
23-
import var Darwin.errno
22+
internal import Darwin
23+
internal import var Darwin.errno
2424
#elseif canImport(Glibc)
25-
import Glibc
25+
internal import Glibc
2626
#elseif canImport(Musl)
27-
import Musl
27+
internal import Musl
2828
#elseif canImport(Android)
29-
import Android
29+
internal import Android
3030
#elseif os(WASI)
31-
import WASILibc
31+
internal import WASILibc
3232
#elseif os(Windows)
33-
import CRT
34-
import WinSDK
33+
internal import CRT
34+
internal import WinSDK
3535
#endif
3636

3737
#if _runtime(_ObjC)
38-
import ObjectiveC
38+
internal import ObjectiveC
3939
#endif
4040

4141
#if SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY

stdlib/private/SwiftReflectionTest/SwiftReflectionTest.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ let RequestPointerSize = "p"
2929

3030

3131
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
32-
import MachO
33-
import Darwin
34-
import var Darwin.errno
32+
internal import MachO
33+
internal import Darwin
34+
internal import var Darwin.errno
3535

3636
#if arch(x86_64) || arch(arm64)
3737
typealias MachHeader = mach_header_64

test/Interop/Cxx/templates/enable-if-typechecker.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import StdlibUnittest
55
import EnableIf
66

7+
78
let x = HasMethodWithEnableIf()
89
x.onlyEnabledForBool("a")
9-
// CHECK: error: could not substitute parameters for C++ function template 'HasMethodWithEnableIf::onlyEnabledForBool': NSString *
10+
// CHECK: error: could not generate C++ types from the generic Swift types provided; the following Swift type(s) provided to 'HasMethodWithEnableIf::onlyEnabledForBool' could not be converted: String

0 commit comments

Comments
 (0)