Skip to content

Commit c04f837

Browse files
authored
Merge pull request #3710 from ntrel/d-override
D: remove `overload`, not a keyword
2 parents 027c099 + 36b4abf commit c04f837

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Units/parser-d.r/simple.d.d/expected.tags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ quxx input.d /^ bool quxx;$/;" m union:Struct.Union file:
2929
test.simple input.d /^module test.simple;$/;" M
3030
tfun input.d /^ auto tfun(T)(T v)$/;" f class:Class
3131
this input.d /^ public this(AliasInt x)$/;" f class:Class
32+
toString input.d /^ override string toString() { return ""; }$/;" f class:Class
3233
type_con input.d /^const(int)* type_con;$/;" v
3334
type_imm input.d /^immutable(int)* type_imm;$/;" v
3435
type_shar input.d /^shared(int)[] type_shar;$/;" v

Units/parser-d.r/simple.d.d/input.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class Class : Interface
3333
this._bar = x;
3434
}
3535

36+
override string toString() { return ""; }
37+
3638
public AliasInt bar()
3739
{
3840
return this._bar;

parsers/c-based.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ enum eKeywordId {
7676
KEYWORD_LONG,
7777
KEYWORD_MUTABLE,
7878
KEYWORD_NAMESPACE, KEYWORD_NEW, KEYWORD_NATIVE,
79-
KEYWORD_OPERATOR, KEYWORD_OVERLOAD, KEYWORD_OVERRIDE,
79+
KEYWORD_OPERATOR, KEYWORD_OVERRIDE,
8080
KEYWORD_PACKAGE, KEYWORD_PRIVATE,
8181
KEYWORD_PROTECTED, KEYWORD_PUBLIC,
8282
KEYWORD_REGISTER, KEYWORD_RETURN, KEYWORD_SHARED,
@@ -443,7 +443,6 @@ static const keywordDesc KeywordTable [] = {
443443
{ "null", KEYWORD_NULL, { 0, 1, 0 } },
444444
{ "operator", KEYWORD_OPERATOR, { 1, 1, 0 } },
445445
{ "out", KEYWORD_OUT, { 0, 1, 0 } },
446-
{ "overload", KEYWORD_OVERLOAD, { 0, 1, 0 } },
447446
{ "override", KEYWORD_OVERRIDE, { 1, 1, 0 } },
448447
{ "package", KEYWORD_PACKAGE, { 0, 1, 1 } },
449448
{ "pragma", KEYWORD_PRAGMA, { 0, 1, 0 } },
@@ -2115,7 +2114,7 @@ static bool skipPostArgumentStuff (
21152114
case KEYWORD_NAMESPACE:
21162115
case KEYWORD_NEW:
21172116
case KEYWORD_OPERATOR:
2118-
case KEYWORD_OVERLOAD:
2117+
case KEYWORD_OVERRIDE:
21192118
case KEYWORD_PRIVATE:
21202119
case KEYWORD_PROTECTED:
21212120
case KEYWORD_PUBLIC:

0 commit comments

Comments
 (0)