Skip to content

Commit d2dca74

Browse files
authored
Merge pull request swiftlang#24882 from slavapestov/tricky-generics-regression-test
Add regression test for fixed crasher
2 parents 026374f + 865b79c commit d2dca74

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// RUN: %target-swift-frontend -typecheck %s
2+
3+
protocol AuthenticationFlowStateMachine {
4+
associatedtype StartState: AuthenticationFlowStateMachineStartState where StartState.StateMachine == Self
5+
associatedtype NonFinalState: AuthenticationFlowStateMachineNonFinalState where NonFinalState.StateMachine == Self
6+
associatedtype FlowError: AuthenticationFlowStateMachineFlowError where FlowError.StateMachine == Self
7+
}
8+
9+
protocol AuthenticationFlowStateMachineFlowError: Error {
10+
associatedtype StateMachine: AuthenticationFlowStateMachine where StateMachine.FlowError == Self
11+
}
12+
13+
protocol AuthenticationFlowStateMachineStartState {
14+
associatedtype StateMachine: AuthenticationFlowStateMachine where StateMachine.StartState == Self
15+
var nonFinalState: StateMachine.NonFinalState { get }
16+
}
17+
18+
protocol AuthenticationFlowStateMachineNonFinalState {
19+
associatedtype StateMachine: AuthenticationFlowStateMachine where StateMachine.NonFinalState == Self
20+
}

0 commit comments

Comments
 (0)