Files
swift-mirror/test/AutoDiff/compiler_crashers_fixed/rdar71191415-nested-differentiation-of-extension-method-optimized.swift
Ben Barham c163e0fe5e [Tests] Make OS features consistent
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.
2022-05-20 19:51:23 -07:00

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)
}
}