diff --git a/mcs/errors/cs1018-2.cs b/mcs/errors/cs1018-2.cs deleted file mode 100644 index 5a9ecbad7bd3e0aca89aacb99cba0305c89ca082..0000000000000000000000000000000000000000 --- a/mcs/errors/cs1018-2.cs +++ /dev/null @@ -1,10 +0,0 @@ -// CS1018: Keyword `this' or `base' expected -// Line: 7 - -class Bar -{ - Bar(int a) - :super() - { - } -} diff --git a/mcs/errors/cs1525-23.cs b/mcs/errors/cs1525-23.cs new file mode 100644 index 0000000000000000000000000000000000000000..8a97e05efb17d661c307723d41b8d7a9424a36ce --- /dev/null +++ b/mcs/errors/cs1525-23.cs @@ -0,0 +1,10 @@ +// CS1525: Unexpected symbol `public', expecting `:', `;', or `{' +// Line: 5 + +class TorrentEditor { + TorrentEditor () + + public TorrentEditor () + { + } +} diff --git a/mcs/errors/cs1018.cs b/mcs/errors/cs1525-24.cs similarity index 50% rename from mcs/errors/cs1018.cs rename to mcs/errors/cs1525-24.cs index ed423c529e6c8b8fe30d5fe714dab9153324f85b..c481178c31afe7c29c959a123da1099a68656aa0 100644 --- a/mcs/errors/cs1018.cs +++ b/mcs/errors/cs1525-24.cs @@ -1,4 +1,4 @@ -// CS1018: Keyword `this' or `base' expected +// CS1525: Unexpected symbol `{', expecting `base' or `this' // Line: 5 class X { diff --git a/mcs/errors/cs1525-25.cs b/mcs/errors/cs1525-25.cs new file mode 100644 index 0000000000000000000000000000000000000000..8e2784c4456cd4fc13b7ae2417664b6d95b0f0b8 --- /dev/null +++ b/mcs/errors/cs1525-25.cs @@ -0,0 +1,10 @@ +// CS1525: Unexpected symbol `super', expecting `base' or `this' +// Line: 7 + +class Bar +{ + Bar(int a) + :super() + { + } +} diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay index de1b01e4a858e557b95348750e627bb6e5ad27dc..84f50dca99adbb714bc47e5f450cf53b426e1e09 100644 --- a/mcs/mcs/cs-parser.jay +++ b/mcs/mcs/cs-parser.jay @@ -2245,8 +2245,9 @@ constructor_initializer $$ = new ConstructorThisInitializer ((Arguments) $5, GetLocation ($2)); lbag.AddLocation ($$, GetLocation ($1), GetLocation ($3), GetLocation ($6)); } - | COLON error { - Report.Error (1018, GetLocation ($1), "Keyword `this' or `base' expected"); + | error + { + Error_SyntaxError (yyToken); $$ = null; } ;