Files
swift-mirror/test/AutoDiff/Sema/DerivedConformances/derived_differentiable_diagnostics.swift
Nishith Shah 8e2e625543 [Diagnostics] Use imperative msg for protocol conformance & switch-case fixits
This commit changes fixit messages from a question/suggestion to an
imperative message for protocol conformances and switch-case. Addresses
https://github.com/apple/swift/issues/67510.
2023-08-13 22:34:26 -07:00

16 lines
572 B
Swift

// RUN: %target-swift-frontend -typecheck -verify %s
import _Differentiation
protocol TangentVectorP: Differentiable {
// expected-note @+1 {{protocol requires property 'requirement' with type 'Int'; add a stub for conformance}}
var requirement: Int { get }
}
protocol TangentVectorConstrained: Differentiable where TangentVector: TangentVectorP {}
struct StructWithTangentVectorConstrained: TangentVectorConstrained {
var x: Float
}
// expected-error @-1 {{type 'StructWithTangentVectorConstrained.TangentVector' does not conform to protocol 'TangentVectorP'}}