Skip to content

Commit

Permalink
Merge pull request #3710 from ntrel/d-override
Browse files Browse the repository at this point in the history
D: remove `overload`, not a keyword
  • Loading branch information
masatake committed May 3, 2023
2 parents 027c099 + 36b4abf commit c04f837
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Units/parser-d.r/simple.d.d/expected.tags
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ quxx input.d /^ bool quxx;$/;" m union:Struct.Union file:
test.simple input.d /^module test.simple;$/;" M
tfun input.d /^ auto tfun(T)(T v)$/;" f class:Class
this input.d /^ public this(AliasInt x)$/;" f class:Class
toString input.d /^ override string toString() { return ""; }$/;" f class:Class
type_con input.d /^const(int)* type_con;$/;" v
type_imm input.d /^immutable(int)* type_imm;$/;" v
type_shar input.d /^shared(int)[] type_shar;$/;" v
2 changes: 2 additions & 0 deletions Units/parser-d.r/simple.d.d/input.d
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class Class : Interface
this._bar = x;
}

override string toString() { return ""; }

public AliasInt bar()
{
return this._bar;
Expand Down
5 changes: 2 additions & 3 deletions parsers/c-based.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ enum eKeywordId {
KEYWORD_LONG,
KEYWORD_MUTABLE,
KEYWORD_NAMESPACE, KEYWORD_NEW, KEYWORD_NATIVE,
KEYWORD_OPERATOR, KEYWORD_OVERLOAD, KEYWORD_OVERRIDE,
KEYWORD_OPERATOR, KEYWORD_OVERRIDE,
KEYWORD_PACKAGE, KEYWORD_PRIVATE,
KEYWORD_PROTECTED, KEYWORD_PUBLIC,
KEYWORD_REGISTER, KEYWORD_RETURN, KEYWORD_SHARED,
Expand Down Expand Up @@ -443,7 +443,6 @@ static const keywordDesc KeywordTable [] = {
{ "null", KEYWORD_NULL, { 0, 1, 0 } },
{ "operator", KEYWORD_OPERATOR, { 1, 1, 0 } },
{ "out", KEYWORD_OUT, { 0, 1, 0 } },
{ "overload", KEYWORD_OVERLOAD, { 0, 1, 0 } },
{ "override", KEYWORD_OVERRIDE, { 1, 1, 0 } },
{ "package", KEYWORD_PACKAGE, { 0, 1, 1 } },
{ "pragma", KEYWORD_PRAGMA, { 0, 1, 0 } },
Expand Down Expand Up @@ -2115,7 +2114,7 @@ static bool skipPostArgumentStuff (
case KEYWORD_NAMESPACE:
case KEYWORD_NEW:
case KEYWORD_OPERATOR:
case KEYWORD_OVERLOAD:
case KEYWORD_OVERRIDE:
case KEYWORD_PRIVATE:
case KEYWORD_PROTECTED:
case KEYWORD_PUBLIC:
Expand Down

0 comments on commit c04f837

Please sign in to comment.