From 52743a95ab3e00935fcd9b5565a2555c30d2d4f4 Mon Sep 17 00:00:00 2001 From: Austin Henriksen Date: Tue, 2 Apr 2024 17:33:24 -0400 Subject: [PATCH] Updated test error message. --- cpp/src/Slice/Grammar.cpp | 2 +- cpp/src/Slice/Grammar.y | 2 +- cpp/test/Slice/errorDetection/NestedModule.err | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/src/Slice/Grammar.cpp b/cpp/src/Slice/Grammar.cpp index c9a3c6844b4..befc734acdd 100644 --- a/cpp/src/Slice/Grammar.cpp +++ b/cpp/src/Slice/Grammar.cpp @@ -1884,7 +1884,7 @@ yyparse(void) size_t startPos = 0; if (ident->v.find("::") == 0) { - currentUnit->error("module identifiers cannot start with '::' prefix"); + currentUnit->error("illegal identifier: module identifiers cannot start with '::' prefix"); startPos += 2; // Skip the leading "::". } diff --git a/cpp/src/Slice/Grammar.y b/cpp/src/Slice/Grammar.y index e9975d847ca..0cd83144d59 100644 --- a/cpp/src/Slice/Grammar.y +++ b/cpp/src/Slice/Grammar.y @@ -393,7 +393,7 @@ module_def size_t startPos = 0; if (ident->v.find("::") == 0) { - currentUnit->error("module identifiers cannot start with '::' prefix"); + currentUnit->error("illegal identifier: module identifiers cannot start with '::' prefix"); startPos += 2; // Skip the leading "::". } diff --git a/cpp/test/Slice/errorDetection/NestedModule.err b/cpp/test/Slice/errorDetection/NestedModule.err index d7f94cf5e7d..c512ae124a0 100644 --- a/cpp/test/Slice/errorDetection/NestedModule.err +++ b/cpp/test/Slice/errorDetection/NestedModule.err @@ -6,5 +6,5 @@ NestedModule.ice:20: illegal identifier `Holder': `Holder' suffix is reserved NestedModule.ice:24: illegal identifier `APtr': `Ptr' suffix is reserved NestedModule.ice:24: illegal identifier `BPrx': `Prx' suffix is reserved NestedModule.ice:24: illegal identifier `CHelper': `Helper' suffix is reserved -NestedModule.ice:27: missing identifier: illegal empty identifier +NestedModule.ice:27: illegal identifier: module identifiers cannot start with '::' prefix NestedModule.ice:27: illegal identifier `Helper': `Helper' suffix is reserved