|
39 | 39 | }
|
40 | 40 |
|
41 | 41 | var methodFromHeader5: CInt
|
42 |
| - // expected-error@-1 {{property 'methodFromHeader5' does not match the instance method declared by the header}} |
| 42 | + // expected-warning@-1 {{property 'methodFromHeader5' does not match the instance method declared by the header}} |
43 | 43 |
|
44 | 44 | func method(fromHeader6: Double) {
|
45 |
| - // expected-error@-1 {{instance method 'method(fromHeader6:)' of type '(Double) -> ()' does not match type '(Int32) -> Void' declared by the header}} |
| 45 | + // expected-warning@-1 {{instance method 'method(fromHeader6:)' of type '(Double) -> ()' does not match type '(Int32) -> Void' declared by the header}} |
46 | 46 | }
|
47 | 47 |
|
48 | 48 | var propertyFromHeader1: CInt
|
|
64 | 64 | }
|
65 | 65 |
|
66 | 66 | @objc let propertyFromHeader5: CInt
|
67 |
| - // expected-error@-1 {{property 'propertyFromHeader5' should be settable to match the settable property declared by the header}} |
| 67 | + // expected-warning@-1 {{property 'propertyFromHeader5' should be settable to match the settable property declared by the header}} |
68 | 68 |
|
69 | 69 | @objc var propertyFromHeader6: CInt {
|
70 |
| - // expected-error@-1 {{property 'propertyFromHeader6' should be settable to match the settable property declared by the header}} |
| 70 | + // expected-warning@-1 {{property 'propertyFromHeader6' should be settable to match the settable property declared by the header}} |
71 | 71 | get { return 1 }
|
72 | 72 | }
|
73 | 73 |
|
74 | 74 | final var propertyFromHeader8: CInt
|
75 | 75 | // FIXME: Should complain about final not fulfilling the @objc requirement
|
76 | 76 |
|
77 | 77 | func propertyFromHeader10() -> CInt {
|
78 |
| - // expected-error@-1 {{instance method 'propertyFromHeader10()' does not match the property declared by the header}} |
| 78 | + // expected-warning@-1 {{instance method 'propertyFromHeader10()' does not match the property declared by the header}} |
79 | 79 | return 1
|
80 | 80 | }
|
81 | 81 |
|
82 | 82 | var propertyFromHeader11: Float
|
83 |
| - // expected-error@-1 {{property 'propertyFromHeader11' of type 'Float' does not match type 'Int32' declared by the header}} |
| 83 | + // expected-warning@-1 {{property 'propertyFromHeader11' of type 'Float' does not match type 'Int32' declared by the header}} |
84 | 84 |
|
85 | 85 | var readonlyPropertyFromHeader1: CInt
|
86 | 86 | // OK, provides an implementation with a stored property that's nonpublicly settable
|
|
154 | 154 | }
|
155 | 155 |
|
156 | 156 | class func classMethod3(_: Float) {
|
157 |
| - // expected-error@-1 {{class method 'classMethod3' of type '(Float) -> ()' does not match type '(Int32) -> Void' declared by the header}} |
| 157 | + // expected-warning@-1 {{class method 'classMethod3' of type '(Float) -> ()' does not match type '(Int32) -> Void' declared by the header}} |
158 | 158 | }
|
159 | 159 |
|
160 | 160 | func instanceMethod1(_: CInt) {
|
|
325 | 325 | func nullUnspecifiedResultAndArg(_: Any!) -> Any! { fatalError() } // no-error
|
326 | 326 |
|
327 | 327 | func nonnullResult1() -> Any { fatalError() } // no-error
|
328 |
| - func nonnullResult2() -> Any? { fatalError() } // expected-error {{instance method 'nonnullResult2()' of type '() -> Any?' does not match type '() -> Any' declared by the header}} |
| 328 | + func nonnullResult2() -> Any? { fatalError() } // expected-warning {{instance method 'nonnullResult2()' of type '() -> Any?' does not match type '() -> Any' declared by the header}} |
329 | 329 | func nonnullResult3() -> Any! { fatalError() } // no-error (special case)
|
330 | 330 |
|
331 | 331 | func nonnullArgument1(_: Any) {} // no-error
|
332 |
| - func nonnullArgument2(_: Any?) {} // expected-error {{instance method 'nonnullArgument2' of type '(Any?) -> ()' does not match type '(Any) -> Void' declared by the header}} |
| 332 | + func nonnullArgument2(_: Any?) {} // expected-warning {{instance method 'nonnullArgument2' of type '(Any?) -> ()' does not match type '(Any) -> Void' declared by the header}} |
333 | 333 | func nonnullArgument3(_: Any!) {} // no-error (special case)
|
334 | 334 |
|
335 |
| - func nullableResult() -> Any { fatalError() } // expected-error {{instance method 'nullableResult()' of type '() -> Any' does not match type '() -> Any?' declared by the header}} |
336 |
| - func nullableArgument(_: Any) {} // expected-error {{instance method 'nullableArgument' of type '(Any) -> ()' does not match type '(Any?) -> Void' declared by the header}} |
| 335 | + func nullableResult() -> Any { fatalError() } // expected-warning {{instance method 'nullableResult()' of type '() -> Any' does not match type '() -> Any?' declared by the header}} |
| 336 | + func nullableArgument(_: Any) {} // expected-warning {{instance method 'nullableArgument' of type '(Any) -> ()' does not match type '(Any?) -> Void' declared by the header}} |
337 | 337 |
|
338 | 338 | func nonPointerResult() -> CInt! { fatalError() } // expected-error{{method cannot be implicitly @objc because its result type cannot be represented in Objective-C}}
|
339 | 339 | func nonPointerArgument(_: CInt!) {} // expected-error {{method cannot be implicitly @objc because the type of the parameter cannot be represented in Objective-C}}
|
|
0 commit comments