We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74c7bff commit 296afc7Copy full SHA for 296afc7
validation-test/Sema/Inputs/sr8493-helper.swift
@@ -0,0 +1,12 @@
1
+class StateAnimatorGroup<State> {
2
+ func add<T: StateAnimator>(_ animator: T) where T.State == State {}
3
+ func set(_ state: State) {}
4
+}
5
+
6
+extension StateAnimatorGroup: StateAnimator where State == String {}
7
8
+protocol StateAnimator {
9
+ associatedtype State
10
11
+ func set(_ state: State)
12
validation-test/Sema/sr8493.swift
@@ -0,0 +1,5 @@
+// RUN: %empty-directory(%t)
+// RUN: cp %s %t/main.swift
+// RUN: %target-swift-frontend -primary-file %t/main.swift %S/Inputs/sr8493-helper.swift -emit-ir -o /dev/null
+StateAnimatorGroup<String>().set("")
0 commit comments