File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
validation-test/Sema/type_checker_crashers_fixed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ struct Generic<T> {
10
10
11
11
@_functionBuilder
12
12
struct Builder {
13
- static func buildBlock< C0, C1> ( _ c0: C0 , _ c1: C1 )
13
+ static func buildBlock< C0, C1> ( _ c0: C0 , _ c1: C1 ) // expected-note {{where 'C0' = 'Empty'}} expected-note {{where 'C1' = 'Test<Empty>'}}
14
14
-> Generic < ( C0 , C1 ) > where C0 : P , C1 : P {
15
15
return Generic ( ( c0, c1) )
16
16
}
@@ -24,11 +24,13 @@ struct Empty {
24
24
init ( ) { }
25
25
}
26
26
27
- struct Test < T> where T : P {
27
+ struct Test < T> where T : P { // expected-note {{where 'T' = 'Empty'}}
28
28
init ( @Builder _: ( ) -> T ) { }
29
29
}
30
30
31
31
let x = G {
32
+ // expected-error@-1 {{static method 'buildBlock' requires that 'Empty' conform to 'P'}}
33
+ // expected-error@-2 {{static method 'buildBlock' requires that 'Test<Empty>' conform to 'P'}}
32
34
Empty ( )
33
- Test { < #code# > } // expected-error {{editor placeholder in source file }}
35
+ Test { Empty ( ) } // expected-error {{generic struct 'Test' requires that 'Empty' conform to 'P' }}
34
36
}
You can’t perform that action at this time.
0 commit comments