mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
lit.py currently allows any substring of `target_triple` to be used as a feature in REQUIRES/UNSUPPORTED/XFAIL. This results in various forms of the OS spread across the tests and is also somewhat confusing since they aren't actually listed in the available features. Modify all OS-related features to use the `OS=` version that Swift adds instead. We can later remove `config.target_triple` so that these don't the non-OS versions don't work in the first place.
37 lines
567 B
Swift
37 lines
567 B
Swift
// RUN: %target-build-swift -O %s
|
|
|
|
// FIXME(rdar://89055298)
|
|
// UNSUPPORTED: OS=linux-gnu
|
|
|
|
// rdar://71191415
|
|
|
|
import _Differentiation
|
|
|
|
protocol P {
|
|
@differentiable(reverse)
|
|
func req(_ input: Float) -> Float
|
|
}
|
|
|
|
extension P {
|
|
@differentiable(reverse)
|
|
func foo(_ input: Float) -> Float {
|
|
return req(input)
|
|
}
|
|
}
|
|
|
|
struct Dummy: P {
|
|
@differentiable(reverse)
|
|
func req(_ input: Float) -> Float {
|
|
input
|
|
}
|
|
}
|
|
|
|
struct DummyComposition: P {
|
|
var layer = Dummy()
|
|
|
|
@differentiable(reverse)
|
|
func req(_ input: Float) -> Float {
|
|
layer.foo(input)
|
|
}
|
|
}
|