Skip to content

Commit 6d96d8f

Browse files
committed
[Test] Disable nested private generic types test on old runtimes.
This test tests a fix in Swift 5.1+. When running on 5.0, it uses expectCrashLater since 5.0 doesn't have the fix. This breaks if we're ever testing a newer runtime on an old OS. We don't need to test if old runtimes are broken (we know they are), just that new runtimes remain fixed. Don't run the test at all unless on 5.1+. rdar://159026050
1 parent b444a0b commit 6d96d8f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

test/Runtime/associated_type_demangle_private.swift

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,9 @@ private struct Parent<Unused> {
101101

102102
AssociatedTypeDemangleTests.test("nested private generic types in associated type witnesses") {
103103
// Fixed in Swift 5.1+ runtimes.
104-
if #available(SwiftStdlib 5.1, *) {}
105-
// Bug is still present in Swift 5.0 runtime.
106-
else {
107-
expectCrashLater(withMessage: "failed to demangle witness for associated type 'Second' in conformance")
108-
return
104+
if #available(SwiftStdlib 5.1, *) {
105+
_ = Parent<Never>.Nested(first: "String", second: 0).pair
109106
}
110-
111-
_ = Parent<Never>.Nested(first: "String", second: 0).pair
112107
}
113108

114109

0 commit comments

Comments
 (0)