File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -32,19 +32,17 @@ var DynamicMetadataCycleTests =
32
32
33
33
enum test0_Node {
34
34
case link( ResilientGenericStruct < test0_Node > )
35
-
36
- static func test( ) -> [ test0_Node ] {
37
- return [ ]
38
- }
39
35
}
36
+
37
+
40
38
DynamicMetadataCycleTests . test ( " cycle through enum " )
41
39
. crashOutputMatches ( " runtime error: unresolvable type metadata dependency cycle detected " )
42
40
. crashOutputMatches ( " main.test0_Node " )
43
41
. crashOutputMatches ( " depends on layout of resil.ResilientGenericStruct<main.test0_Node " )
44
42
. crashOutputMatches ( " depends on layout of main.test0_Node " )
45
43
. code {
46
44
expectCrashLater ( )
47
- _ = test0_Node. test ( )
45
+ _blackHole ( test0_Node. self )
48
46
}
49
47
50
48
runAllTests ( )
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: cp %s %t/main.swift
3
+ // RUN: %target-swift-frontend -primary-file %t/main.swift %S/Inputs/sr8493-helper.swift -emit-ir -o /dev/null
4
+
5
+ StateAnimatorGroup < String > ( ) . set ( " " )
You can’t perform that action at this time.
0 commit comments