blob: f73044cffdd54844344e3ef2f03fbb78ebcd1029 [file] [log] [blame]
// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s
protocol Associated {
associatedtype Assoc
}
struct Abstracted<T: Associated, U: Associated> {
let closure: (T.Assoc) -> U.Assoc
}
struct S1 {}
struct S2 {}
// CHECK-LABEL: sil hidden @_TF21same_type_abstraction28callClosureWithConcreteTypes
// CHECK: function_ref @_TTR
func callClosureWithConcreteTypes<
T: Associated, U: Associated
where
T.Assoc == S1, U.Assoc == S2
>(x x: Abstracted<T, U>, arg: S1) -> S2 {
return x.closure(arg)
}