Skip to content

Commit de8a910

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-rebranch
2 parents 7b07d1f + 7db162e commit de8a910

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

include/swift/AST/DiagnosticsParse.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ ERROR(lex_illegal_multiline_string_end,none,
163163
"multi-line string literal closing delimiter must begin on a new line", ())
164164
ERROR(lex_multiline_string_indent_inconsistent,none,
165165
"%select{unexpected space in|unexpected tab in|insufficient}2 indentation of "
166-
"%select{line|next %1 lines}0 in multi-line string literal",
166+
"%select{line|next %1 lines}0 in multi-line string literal",
167167
(bool, unsigned, unsigned))
168168
NOTE(lex_multiline_string_indent_should_match_here,none,
169169
"should match %select{space|tab}0 here", (unsigned))
@@ -252,7 +252,7 @@ ERROR(cskeyword_not_attribute,none,
252252
"'%0' is a declaration modifier, not an attribute", (StringRef))
253253

254254
ERROR(decl_already_static,none,
255-
"%0 specified twice", (StaticSpellingKind))
255+
"%0 cannot appear after another 'static' or 'class' keyword", (StaticSpellingKind))
256256

257257
ERROR(enum_case_dot_prefix,none,
258258
"extraneous '.' in enum 'case' declaration", ())
@@ -881,7 +881,7 @@ WARNING(parameter_extraneous_double_up,none,
881881
"extraneous duplicate parameter name; %0 already has an argument "
882882
"label", (Identifier))
883883
ERROR(parameter_operator_keyword_argument,none,
884-
"%select{operator|closure|enum case}0 cannot have keyword arguments",
884+
"%select{operator|closure|enum case}0 cannot have keyword arguments",
885885
(unsigned))
886886

887887
ERROR(parameter_unnamed,none,

test/Parse/subscripting.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct X4 {
5959

6060
struct X5 {
6161
static var stored: Int = 1
62-
62+
6363
static subscript(i: Int) -> Int {
6464
get {
6565
return stored + i
@@ -72,7 +72,7 @@ struct X5 {
7272

7373
class X6 {
7474
static var stored: Int = 1
75-
75+
7676
class subscript(i: Int) -> Int {
7777
get {
7878
return stored + i
@@ -117,7 +117,7 @@ struct A0 {
117117
stored = value
118118
}
119119
}
120-
120+
121121
subscript -> Int { // expected-error {{expected '(' for subscript parameters}} {{12-12=()}}
122122
return 1
123123
}
@@ -189,7 +189,7 @@ struct A7 {
189189
}
190190

191191
class A7b {
192-
class static subscript(a: Float) -> Int { // expected-error {{'static' specified twice}} {{9-16=}}
192+
class static subscript(a: Float) -> Int { // expected-error {{'static' cannot appear after another 'static' or 'class' keyword}} {{9-16=}}
193193
get {
194194
return 42
195195
}

test/decl/func/static_func.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ struct InMemberFunc {
2929
}
3030

3131
struct DuplicateStatic {
32-
static static func f1() {} // expected-error{{'static' specified twice}}{{10-17=}}
33-
static class func f2() {} // expected-error{{'class' specified twice}}{{10-16=}}
34-
class static func f3() {} // expected-error{{'static' specified twice}}{{9-16=}} expected-error{{class methods are only allowed within classes; use 'static' to declare a static method}}{{3-8=static}}
35-
class class func f4() {} // expected-error{{'class' specified twice}}{{9-15=}} expected-error{{class methods are only allowed within classes; use 'static' to declare a static method}}{{3-8=static}}
36-
override static static func f5() {} // expected-error{{'static' specified twice}}{{19-26=}} expected-error{{'override' can only be specified on class members}} {{3-12=}}
37-
static override static func f6() {} // expected-error{{'static' specified twice}}{{19-26=}} expected-error{{'override' can only be specified on class members}} {{10-19=}}
38-
static static override func f7() {} // expected-error{{'static' specified twice}}{{10-17=}} expected-error{{'override' can only be specified on class members}} {{17-26=}}
32+
static static func f1() {} // expected-error{{'static' cannot appear after another 'static' or 'class' keyword}}{{10-17=}}
33+
static class func f2() {} // expected-error{{'class' cannot appear after another 'static' or 'class' keyword}}{{10-16=}}
34+
class static func f3() {} // expected-error{{'static' cannot appear after another 'static' or 'class' keyword}}{{9-16=}} expected-error{{class methods are only allowed within classes; use 'static' to declare a static method}}{{3-8=static}}
35+
class class func f4() {} // expected-error{{'class' cannot appear after another 'static' or 'class' keyword}}{{9-15=}} expected-error{{class methods are only allowed within classes; use 'static' to declare a static method}}{{3-8=static}}
36+
override static static func f5() {} // expected-error{{'static' cannot appear after another 'static' or 'class' keyword}}{{19-26=}} expected-error{{'override' can only be specified on class members}} {{3-12=}}
37+
static override static func f6() {} // expected-error{{'static' cannot appear after another 'static' or 'class' keyword}}{{19-26=}} expected-error{{'override' can only be specified on class members}} {{10-19=}}
38+
static static override func f7() {} // expected-error{{'static' cannot appear after another 'static' or 'class' keyword}}{{10-17=}} expected-error{{'override' can only be specified on class members}} {{17-26=}}
3939
static final func f8() {} // expected-error {{only classes and class members may be marked with 'final'}}
4040
}
4141

0 commit comments

Comments
 (0)