|
3 | 3 | import UnimportableMembers
|
4 | 4 | import UnimportableMembersUser
|
5 | 5 |
|
6 |
| -class IncompleteInitSubclassImplicit : IncompleteDesignatedInitializers { // expected-note 6 {{incorrect labels for candidate}} |
| 6 | +class IncompleteInitSubclassImplicit : IncompleteDesignatedInitializers { |
| 7 | + // expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}} |
| 8 | + // expected-note@-2 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}} |
| 9 | + // expected-note@-3 {{incorrect label for candidate (have: 'conveniently:', expected: 'first:')}} |
| 10 | + // expected-note@-4 {{incorrect label for candidate (have: 'conveniently:', expected: 'second:')}} |
| 11 | + // expected-note@-5 {{incorrect label for candidate (have: 'category:', expected: 'first:')}} |
| 12 | + // expected-note@-6 {{incorrect label for candidate (have: 'category:', expected: 'second:')}} |
7 | 13 | var myOneNewMember = 1
|
8 | 14 | }
|
9 | 15 |
|
10 | 16 | class IncompleteInitSubclass : IncompleteDesignatedInitializers {
|
11 |
| - override init(first: Int) {} // expected-note 3 {{incorrect labels for candidate}} |
12 |
| - override init(second: Int) {} // expected-note 3 {{incorrect labels for candidate}} |
| 17 | + override init(first: Int) {} |
| 18 | + // expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}} |
| 19 | + // expected-note@-2 {{incorrect label for candidate (have: 'conveniently:', expected: 'first:')}} |
| 20 | + // expected-note@-3 {{incorrect label for candidate (have: 'category:', expected: 'first:')}} |
| 21 | + override init(second: Int) {} |
| 22 | + // expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}} |
| 23 | + // expected-note@-2 {{incorrect label for candidate (have: 'conveniently:', expected: 'second:')}} |
| 24 | + // expected-note@-3 {{incorrect label for candidate (have: 'category:', expected: 'second:')}} |
13 | 25 | }
|
14 | 26 |
|
15 |
| -class IncompleteConvenienceInitSubclass : IncompleteConvenienceInitializers {} // expected-note 2 {{incorrect labels for candidate}} |
| 27 | +class IncompleteConvenienceInitSubclass : IncompleteConvenienceInitializers {} |
| 28 | +// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}} |
| 29 | +// expected-note@-2 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}} |
16 | 30 |
|
17 |
| -class IncompleteUnknownInitSubclass : IncompleteUnknownInitializers {} // expected-note 4 {{incorrect labels for candidate}} |
| 31 | +class IncompleteUnknownInitSubclass : IncompleteUnknownInitializers {} |
| 32 | +// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}} |
| 33 | +// expected-note@-2 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}} |
| 34 | +// expected-note@-3 {{incorrect label for candidate (have: 'missing:', expected: 'conveniently:')}} |
| 35 | +// expected-note@-4 {{incorrect label for candidate (have: 'missing:', expected: 'category:')}} |
18 | 36 |
|
19 |
| -class IncompleteInitCategorySubclassImplicit : IncompleteDesignatedInitializersWithCategory {} // expected-note 6 {{incorrect labels for candidate}} |
| 37 | +class IncompleteInitCategorySubclassImplicit : IncompleteDesignatedInitializersWithCategory {} |
| 38 | +// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}} |
| 39 | +// expected-note@-2 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}} |
| 40 | +// expected-note@-3 {{incorrect label for candidate (have: 'conveniently:', expected: 'first:')}} |
| 41 | +// expected-note@-4 {{incorrect label for candidate (have: 'conveniently:', expected: 'second:')}} |
| 42 | +// expected-note@-5 {{incorrect label for candidate (have: 'category:', expected: 'first:')}} |
| 43 | +// expected-note@-6 {{incorrect label for candidate (have: 'category:', expected: 'second:')}} |
20 | 44 |
|
21 | 45 | class IncompleteInitCategorySubclass : IncompleteDesignatedInitializersWithCategory {
|
22 |
| - override init(first: Int) {} // expected-note 3 {{incorrect labels for candidate}} |
23 |
| - override init(second: Int) {} // expected-note 3 {{incorrect labels for candidate}} |
| 46 | + override init(first: Int) {} |
| 47 | + // expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}} |
| 48 | + // expected-note@-2 {{incorrect label for candidate (have: 'conveniently:', expected: 'first:')}} |
| 49 | + // expected-note@-3 {{incorrect label for candidate (have: 'category:', expected: 'first:')}} |
| 50 | + override init(second: Int) {} |
| 51 | + // expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}} |
| 52 | + // expected-note@-2 {{incorrect label for candidate (have: 'conveniently:', expected: 'second:')}} |
| 53 | + // expected-note@-3 {{incorrect label for candidate (have: 'category:', expected: 'second:')}} |
24 | 54 | }
|
25 | 55 |
|
26 |
| -class DesignatedInitializerInAnotherModuleSubclass : DesignatedInitializerInAnotherModule {} // expected-note 9 {{incorrect labels for candidate}} |
27 |
| - |
| 56 | +class DesignatedInitializerInAnotherModuleSubclass : DesignatedInitializerInAnotherModule {} |
| 57 | +// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}} |
| 58 | +// expected-note@-2 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}} |
| 59 | +// expected-note@-3 {{incorrect label for candidate (have: 'missing:', expected: 'fromOtherModule:')}} |
| 60 | +// expected-note@-4 {{incorrect label for candidate (have: 'conveniently:', expected: 'first:')}} |
| 61 | +// expected-note@-5 {{incorrect label for candidate (have: 'conveniently:', expected: 'second:')}} |
| 62 | +// expected-note@-6 {{incorrect label for candidate (have: 'conveniently:', expected: 'fromOtherModule:')}} |
| 63 | +// expected-note@-7 {{incorrect label for candidate (have: 'category:', expected: 'first:')}} |
| 64 | +// expected-note@-8 {{incorrect label for candidate (have: 'category:', expected: 'second:')}} |
| 65 | +// expected-note@-9 {{incorrect label for candidate (have: 'category:', expected: 'fromOtherModule:')}} |
28 | 66 |
|
29 | 67 | func testBaseClassesBehaveAsExpected() {
|
30 | 68 | _ = IncompleteDesignatedInitializers(first: 0) // okay
|
|
0 commit comments