[AST] Improve diagnostics message for swift users.

Use `initializer` instead of `constructor` because it is more official word to express its meaning.
This commit is contained in:
fummicc1
2024-03-27 12:32:25 +09:00
parent 55c4956fba
commit 4dda7efc0f
15 changed files with 61 additions and 61 deletions

View File

@@ -7,11 +7,11 @@ func test_subscript_accepts_type_name_argument() {
}
func test(a: A, optA: A?) {
let _ = a[A] // expected-error {{expected member name or constructor call after type name}}
let _ = a[A] // expected-error {{expected member name or initializer call after type name}}
// expected-note@-1 {{add arguments after the type to construct a value of the type}} {{16-16=()}}
// expected-note@-2 {{use '.self' to reference the type object}} {{16-16=.self}}
let _ = optA?[A] // expected-error {{expected member name or constructor call after type name}}
let _ = optA?[A] // expected-error {{expected member name or initializer call after type name}}
// expected-note@-1 {{add arguments after the type to construct a value of the type}} {{20-20=()}}
// expected-note@-2 {{use '.self' to reference the type object}} {{20-20=.self}}
}