Files
swift-mirror/test/Generics/copyable_and_self_conforming_protocols.swift
Meghana Gupta e8abd59da5 Update tests
2024-11-18 18:09:19 -08:00

20 lines
346 B
Swift

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify
// REQUIRES: objc_interop
import Foundation
@objc protocol MyResult {
}
class Request<T : MyResult> {
}
struct Test {
let closure: (Request<MyResult>) -> Void
func test<R>(_ request: Request<R>) {
self.closure(request as! Request<MyResult>)
}
}