[test] Adjust tests now that Optional supports nonescapable use

`Optional` is now depending on `$NonescapableTypes`, and thus the compiler no longer generates `#else` branches to allow suppressing that feature.
This commit is contained in:
Karoy Lorentey
2025-01-13 17:00:48 -08:00
parent b7b75aeace
commit 9ecfac21ff
4 changed files with 2 additions and 20 deletions

View File

@@ -140,28 +140,16 @@ import NoncopyableGenerics_Misc
// CHECK-MISC-NEXT: }
// CHECK-MISC-NEXT: #if compiler(>=5.3) && $NonescapableTypes
// CHECK-MISC-NEXT: public func substCopyable(_ t: Swift.String?)
// CHECK-MISC-NEXT: #else
// CHECK-MISC-NEXT: public func substCopyable(_ t: Swift.String?)
// CHECK-MISC-NEXT: #endif
// CHECK-MISC-NEXT: #if compiler(>=5.3) && $NonescapableTypes
// CHECK-MISC-NEXT: public func substGenericCopyable<T>(_ t: T?)
// CHECK-MISC-NEXT: #else
// CHECK-MISC-NEXT: public func substGenericCopyable<T>(_ t: T?)
// CHECK-MISC-NEXT: #endif
// NOTE: we really shouldn't be emitting the else branch for the two funcs
// below, since the suppressed version isn't valid. We don't have a good way of
// fixing that right now, either.
// CHECK-MISC-NEXT: #if compiler(>=5.3) && $NonescapableTypes
// CHECK-MISC-NEXT: public func substNC(_ t: borrowing {{.*}}.NoCopyPls?)
// CHECK-MISC-NEXT: #else
// CHECK-MISC-NEXT: public func substNC(_ t: borrowing {{.*}}.NoCopyPls?)
// CHECK-MISC-NEXT: #endif
// CHECK-MISC-NEXT: #if compiler(>=5.3) && $NonescapableTypes
// CHECK-MISC-NEXT: public func substGenericNC<T>(_ t: borrowing T?) where T : ~Copyable
// CHECK-MISC-NEXT: #else
// CHECK-MISC-NEXT: public func substGenericNC<T>(_ t: borrowing T?) where T : ~Copyable
// CHECK-MISC-NEXT: #endif
// CHECK-MISC: public protocol Publik : ~Copyable {