Skip to content

[pull] swiftwasm from main #1899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions test/Interpreter/runtime_name_local_class_opaque_type.swift
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
// 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
// REQUIRES: objc_interop

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")
}
1 change: 1 addition & 0 deletions test/SIL/Parser/async.sil
Original file line number Diff line number Diff line change
@@ -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
Expand Down