Skip to content

Commit 7a3736a

Browse files
committed
[Tests] NFC: Add a test-case for self-conforming protocols and Copyable interaction
1 parent 2ded8ba commit 7a3736a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -enable-experimental-feature NoncopyableGenerics -enable-experimental-feature NonescapableTypes %s -verify
2+
3+
// REQUIRES: objc_interop
4+
// REQUIRES: asserts
5+
6+
import Foundation
7+
8+
@objc protocol MyResult {
9+
}
10+
11+
class Request<T : MyResult> {
12+
}
13+
14+
struct Test {
15+
let closure: (Request<MyResult>) -> Void
16+
17+
func test<R>(_ request: Request<R>) {
18+
self.closure(request as! Request<MyResult>)
19+
}
20+
}

0 commit comments

Comments
 (0)