blob: 5dd77d828cb70bf57502548baa6bc22ad3589575 [file] [log] [blame]
// Verify that `@differentiable` declarations can be differentiated from other
// modules.
public struct Foo: Differentiable {
public var x: Float
@differentiable
public init(_ x: Float) {
self.x = x
}
@differentiable
public func method() -> Float {
x
}
@differentiable
public var computedProperty: Float {
x
}
@differentiable
public subscript() -> Float {
x
}
}