File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ struct TupleP<U> : P {
144
144
145
145
@_functionBuilder
146
146
struct Builder {
147
- static func buildBlock< S0, S1> ( _ stmt1: S0 , _ stmt2: S1 ) // expected-note {{where 'S1' = 'Label<Any>.Type'}}
147
+ static func buildBlock< S0, S1> ( _ stmt1: S0 , _ stmt2: S1 )
148
148
-> TupleP < ( S0 , S1 ) > where S0: P , S1: P {
149
149
return TupleP ( ( stmt1, stmt2) )
150
150
}
@@ -166,7 +166,7 @@ struct Label<L> : P where L : P { // expected-note {{'L' declared as parameter t
166
166
}
167
167
168
168
func test_51167632( ) -> some P {
169
- AnyP ( G { // expected-error {{static method 'buildBlock' requires that 'Label<Any>.Type' conform to 'P'}}
169
+ AnyP ( G {
170
170
Text ( " hello " )
171
171
Label // expected-error {{generic parameter 'L' could not be inferred}}
172
172
// expected-note@-1 {{explicitly specify the generic arguments to fix this issue}} {{10-10=<<#L: P#>>}}
Original file line number Diff line number Diff line change @@ -27,23 +27,18 @@ var globalWithEmptyImplicitGetter: Int {}
27
27
// FIXME: extra diagnostics
28
28
@Maker
29
29
var globalWithEmptyExplicitGetter : Int { get { } } // expected-error{{type 'Maker' has no member 'buildBlock'}}
30
- // expected-error@-1 {{cannot convert return expression of type 'Any' to return type 'Int'}}
31
30
32
31
@Maker
33
32
var globalWithSingleGetter : Int { 0 } // expected-error {{ype 'Maker' has no member 'buildBlock'}}
34
- // expected-error@-1 {{cannot convert return expression of type 'Any' to return type 'Int'}}
35
33
36
34
@Maker
37
35
var globalWithMultiGetter : Int { 0 ; 0 } // expected-error {{ype 'Maker' has no member 'buildBlock'}}
38
- // expected-error@-1 {{cannot convert return expression of type 'Any' to return type 'Int'}}
39
36
40
37
@Maker
41
38
func globalFunction( ) { } // expected-error {{ype 'Maker' has no member 'buildBlock'}}
42
- // expected-error@-1 {{unexpected non-void return value in void function}}
43
39
44
40
@Maker
45
41
func globalFunctionWithFunctionParam( fn: ( ) -> ( ) ) { } // expected-error {{ype 'Maker' has no member 'buildBlock'}}
46
- // expected-error@-1 {{unexpected non-void return value in void function}}
47
42
48
43
func makerParam( @Maker
49
44
fn: ( ) -> ( ) ) { }
You can’t perform that action at this time.
0 commit comments