diff --git a/test/Interpreter/runtime_name_local_class_opaque_type.swift b/test/Interpreter/runtime_name_local_class_opaque_type.swift index 1b325fc10664b..e7a18e316780c 100644 --- a/test/Interpreter/runtime_name_local_class_opaque_type.swift +++ b/test/Interpreter/runtime_name_local_class_opaque_type.swift @@ -1,5 +1,5 @@ // RUN: %empty-directory(%t) -// RUN: %target-build-swift -Xfrontend -disable-availability-checking %s -o %t/a.out +// RUN: %target-build-swift %s -o %t/a.out // RUN: %target-run %t/a.out | %FileCheck %s // REQUIRES: executable_test @@ -7,18 +7,27 @@ protocol MyProtocol {} +@available(iOS 13, macOS 10.15, tvOS 13, watchOS 6, *) func returnsClass1() -> some MyProtocol { class MyClass1: MyProtocol {} return MyClass1() } -var returnsClass2: some MyProtocol { - class MyClass2: MyProtocol {} - return MyClass2() +@available(iOS 13, macOS 10.15, tvOS 13, watchOS 6, *) +struct Outer { + static var returnsClass2: some MyProtocol { + class MyClass2: MyProtocol {} + return MyClass2() + } } -print(returnsClass1()) // CHECK: a.(unknown context at ${{[0-9a-z]+}}).(unknown context at ${{[0-9a-z]+}}).MyClass1 - -print(returnsClass2) -// CHECK: a.(unknown context at ${{[0-9a-z]+}}).(unknown context at ${{[0-9a-z]+}}).MyClass2 +// CHECK: a.Outer.(unknown context at ${{[0-9a-z]+}}).(unknown context at ${{[0-9a-z]+}}).MyClass2 +if #available(iOS 13, macOS 10.15, tvOS 13, watchOS 6, *) { + print(returnsClass1()) + print(Outer.returnsClass2) +} else { + // Make FileCheck happy if this test runs on an older OS. + print("a.(unknown context at $0).(unknown context at $0).MyClass1") + print("a.Outer.(unknown context at $0).(unknown context at $0).MyClass2") +} diff --git a/test/SIL/Parser/async.sil b/test/SIL/Parser/async.sil index 992fb8d34a95e..6516b47029eea 100644 --- a/test/SIL/Parser/async.sil +++ b/test/SIL/Parser/async.sil @@ -1,4 +1,5 @@ // RUN: %target-sil-opt -enable-sil-verify-all=true %s | %target-sil-opt -enable-sil-verify-all=true | %FileCheck %s +// REQUIRES: concurrency import Builtin import Swift