mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
21 lines
966 B
Swift
21 lines
966 B
Swift
// RUN: %target-swift-frontend -typecheck %s
|
|
|
|
protocol AuthenticationFlowStateMachine {
|
|
associatedtype StartState: AuthenticationFlowStateMachineStartState where StartState.StateMachine == Self
|
|
associatedtype NonFinalState: AuthenticationFlowStateMachineNonFinalState where NonFinalState.StateMachine == Self
|
|
associatedtype FlowError: AuthenticationFlowStateMachineFlowError where FlowError.StateMachine == Self
|
|
}
|
|
|
|
protocol AuthenticationFlowStateMachineFlowError: Error {
|
|
associatedtype StateMachine: AuthenticationFlowStateMachine where StateMachine.FlowError == Self
|
|
}
|
|
|
|
protocol AuthenticationFlowStateMachineStartState {
|
|
associatedtype StateMachine: AuthenticationFlowStateMachine where StateMachine.StartState == Self
|
|
var nonFinalState: StateMachine.NonFinalState { get }
|
|
}
|
|
|
|
protocol AuthenticationFlowStateMachineNonFinalState {
|
|
associatedtype StateMachine: AuthenticationFlowStateMachine where StateMachine.NonFinalState == Self
|
|
}
|