blob: fd058a1f4e3aaa6a8da0e7b52096ecea070b5941 [file] [log] [blame]
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-sib %s -o %t/tmp.sib
// RUN: %target-sil-opt %t/tmp.sib
// TF-256: Crashes when deserializing witness thunk for requirement requiring
// differentiability wrt a subset of parameters.
protocol DifferentiableWRTSubset : Differentiable {
@differentiable(wrt: (self))
func f(x: Float) -> Float
@differentiable(wrt: (x))
func g(x: Float) -> Float
}
struct TF256 : DifferentiableWRTSubset {
var param: Float = 0
@differentiable(wrt: (self))
func f(x: Float) -> Float { return x + param }
@differentiable(wrt: (x))
func g(x: Float) -> Float { return x + param }
}