mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
16 lines
572 B
Swift
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'}}
|