Skip to content

Commit a8bf642

Browse files
authored
Merge pull request #38935 from al45tair/problem/37170485
[Tests] Fix a couple of type round trip test problems.
2 parents 8f1872a + 785543a commit a8bf642

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

stdlib/public/CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,8 @@ if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_REMOTE_MIRROR)
7070
"${SWIFT_SOURCE_DIR}/lib/Demangling/OldDemangler.cpp"
7171
"${SWIFT_SOURCE_DIR}/lib/Demangling/OldRemangler.cpp"
7272
"${SWIFT_SOURCE_DIR}/lib/Demangling/Punycode.cpp"
73-
"${SWIFT_SOURCE_DIR}/lib/Demangling/Remangler.cpp")
74-
75-
# When we're building with assertions, include the demangle node dumper to aid
76-
# in debugging.
77-
if(LLVM_ENABLE_ASSERTIONS)
78-
list(APPEND swiftDemanglingSources
79-
"${SWIFT_SOURCE_DIR}/lib/Demangling/NodeDumper.cpp")
80-
endif()
73+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Remangler.cpp"
74+
"${SWIFT_SOURCE_DIR}/lib/Demangling/NodeDumper.cpp")
8175

8276
add_swift_target_library(swiftDemangling OBJECT_LIBRARY
8377
${swiftDemanglingSources}

test/TypeRoundTrip/Inputs/testcases/structural_types.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ public func test() {
2222
roundTripType((x: Int, Float, y: Int.Type).self)
2323
roundTripType(((@escaping () -> ()) -> ()).self)
2424
roundTripType(Array<@convention(c) () -> ()>.self)
25+
26+
// @convention(block) requires Objective-C support
27+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
2528
roundTripType(Array<(@escaping @convention(block) () -> (), @convention(block) () -> ()) -> ()>.self)
29+
#endif
2630

2731
roundTripType(Int.Type.self)
2832
roundTripType(((inout String) -> ()).Type.self)
@@ -39,7 +43,11 @@ public func test() {
3943
roundTripType((x: Int, Float, y: Int.Type).Type.self)
4044
roundTripType(((@escaping () -> ()) -> ()).Type.self)
4145
roundTripType(Array<@convention(c) () -> ()>.Type.self)
46+
47+
// @convention(block) requires Objective-C support
48+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
4249
roundTripType(Array<(@escaping @convention(block) () -> (), @convention(block) () -> ()) -> ()>.Type.self)
50+
#endif
4351

4452
// rdar://81587763: [SR-15025]: Function type syntax doesn't accept variadics
4553
// or __owned

0 commit comments

Comments
 (0)