Skip to content

Commit be98908

Browse files
committed
update existing regression tests after small diagnostics refactor
new phrasing in the error messages to match up with other phrasing used in messages.
1 parent 0977c0a commit be98908

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

test/IDE/complete_asyncannotation.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ func testMemberAsyncRethrows(_ x: HasAsyncMembers) async {
6565
func testAsyncIntiializers() async {
6666
HasAsyncMembers(#^CHECK_initializers^#
6767
// CHECK_initializers: Begin completions
68-
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal: ['('][')'][#HasAsyncMembers#]; name=
69-
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal: ['(']{#withAsync: Int#}[')'][#HasAsyncMembers#]; name=withAsync: Int
70-
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal: ['(']{#withAsyncThrows: Int#}[')'][' throws'][#HasAsyncMembers#]; name=withAsyncThrows: Int throws
71-
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal: ['(']{#withAsyncRethrows: () async throws -> Void##() async throws -> Void#}[')'][' rethrows'][#HasAsyncMembers#]; name=withAsyncRethrows: () async throws -> Void rethrows
68+
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal: ['('][')'][' async'][#HasAsyncMembers#]; name= async
69+
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal: ['(']{#withAsync: Int#}[')'][' async'][#HasAsyncMembers#]; name=withAsync: Int async
70+
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal: ['(']{#withAsyncThrows: Int#}[')'][' async'][' throws'][#HasAsyncMembers#]; name=withAsyncThrows: Int async throws
71+
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal: ['(']{#withAsyncRethrows: () async throws -> Void##() async throws -> Void#}[')'][' async'][' rethrows'][#HasAsyncMembers#]; name=withAsyncRethrows: () async throws -> Void async rethrows
7272
// CHECK_initializers: End completions
7373
}

test/decl/class/effectful_properties.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Presidio : GolfCourse {
3636
set { yardsFromBackTees = newValue }
3737
}
3838

39-
override var holes : Int { // expected-error {{cannot override non-'async' property with 'async' property}}
39+
override var holes : Int { // expected-error {{cannot override non-async property with async property}}
4040
get async { 18 }
4141
}
4242

@@ -50,11 +50,11 @@ class Presidio : GolfCourse {
5050
}
5151

5252
class PresidioBackNine : Presidio {
53-
override var par : Int { // expected-error{{cannot override non-'throws' property with 'throws' property}}
53+
override var par : Int { // expected-error{{cannot override non-throwing property with throwing property}}
5454
get throws { 36 } // attempts to put the 'throws' effect back
5555
}
5656

57-
override subscript(_ i : Int) -> Int { // expected-error{{cannot override non-'async' subscript with 'async' subscript}}
57+
override subscript(_ i : Int) -> Int { // expected-error{{cannot override non-async subscript with async subscript}}
5858
get async throws { 0 }
5959
}
6060
}

test/decl/func/rethrows.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ class C1 : Super {
7171

7272
class C2 : Super {
7373
override func tf() throws {}
74-
override func nf() throws {} // expected-error {{cannot override non-throwing method with throwing method}}
74+
override func nf() throws {} // expected-error {{cannot override non-throwing instance method with throwing instance method}}
7575

7676
override func thf(_ f: () throws -> ()) throws {}
77-
override func nhf(_ f: () throws -> ()) throws {} // expected-error {{cannot override non-throwing method with throwing method}}
77+
override func nhf(_ f: () throws -> ()) throws {} // expected-error {{cannot override non-throwing instance method with throwing instance method}}
7878
override func rhf(_ f: () throws -> ()) throws {} // expected-error {{override of 'rethrows' method should also be 'rethrows'}}
7979
}
8080

@@ -83,7 +83,7 @@ class C3 : Super {
8383
override func nf() {}
8484

8585
override func thf(_ f: () throws -> ()) rethrows {}
86-
override func nhf(_ f: () throws -> ()) rethrows {} // expected-error {{cannot override non-throwing method with throwing method}}
86+
override func nhf(_ f: () throws -> ()) rethrows {} // expected-error {{cannot override non-throwing instance method with throwing instance method}}
8787
override func rhf(_ f: () throws -> ()) rethrows {}
8888
}
8989

test/decl/protocol/effectful_properties.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,12 @@ protocol HammeredDulcimer {
314314
}
315315

316316
protocol Santur : HammeredDulcimer {
317-
override subscript(_ note : Int) -> Int { get throws } // expected-error{{cannot override non-'throws' subscript with 'throws' subscript}}
317+
override subscript(_ note : Int) -> Int { get throws } // expected-error{{cannot override non-throwing subscript with throwing subscript}}
318318
override var bridges : Int { get throws }
319319
}
320320

321321
protocol Santoor : Santur {
322-
override var bridges : Int { get async throws } // expected-error{{cannot override non-'async' property with 'async' property}}
322+
override var bridges : Int { get async throws } // expected-error{{cannot override non-async property with async property}}
323323
}
324324

325325
protocol Yangqin : HammeredDulcimer {
@@ -328,5 +328,5 @@ protocol Yangqin : HammeredDulcimer {
328328

329329
protocol Hackbrett : HammeredDulcimer {
330330
override var bridges : Int { get } // no effects are OK
331-
override subscript(_ note : Int) -> Int { get async throws } // expected-error {{cannot override non-'async' subscript with 'async' subscript}}
331+
override subscript(_ note : Int) -> Int { get async throws } // expected-error {{cannot override non-async subscript with async subscript}}
332332
}

0 commit comments

Comments
 (0)