mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
25 lines
286 B
Swift
25 lines
286 B
Swift
// RUN: %target-swift-frontend -emit-sil %s
|
|
// REQUIRES: objc_interop
|
|
|
|
// Just make sure this doesn't crash.
|
|
|
|
import Foundation
|
|
|
|
@objc protocol P {
|
|
func f()
|
|
}
|
|
|
|
class C : P {
|
|
func f() {}
|
|
}
|
|
|
|
@_transparent func g<T : P>(_ t: T) {
|
|
t.f()
|
|
}
|
|
|
|
func callsG(_ c: C) {
|
|
g(c)
|
|
}
|
|
|
|
callsG(C())
|