aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-12-21 18:23:29 +0000
committerGitHub <noreply@github.com>2025-12-21 18:23:29 +0000
commit6883509bd0592cc9a8ccb4aa16c20a6da7660dcd (patch)
treeabc21fdd2b0d367f8da2c095f43907b2c72ed876 /src
parent9d3febb6f03d78965b993da3ef32ec1b983b159d (diff)
parent8ca7fc481fad1a335b5ca46b9f997396df9be1aa (diff)
Merge pull request #6049 from krnowak/krnowak/init-fini-error-msg
Fix misleading error messages for init, fini and test attributes
Diffstat (limited to 'src')
-rw-r--r--src/checker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 4d5482933..33121b453 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -3581,7 +3581,7 @@ gb_internal DECL_ATTRIBUTE_PROC(proc_decl_attribute) {
return true;
} else if (name == "test") {
if (value != nullptr) {
- error(value, "'%.*s' expects no parameter, or a string literal containing \"file\" or \"package\"", LIT(name));
+ error(value, "Expected no value for '%.*s'", LIT(name));
}
ac->test = true;
return true;
@@ -3629,13 +3629,13 @@ gb_internal DECL_ATTRIBUTE_PROC(proc_decl_attribute) {
return true;
} else if (name == "init") {
if (value != nullptr) {
- error(value, "'%.*s' expects no parameter, or a string literal containing \"file\" or \"package\"", LIT(name));
+ error(value, "Expected no value for '%.*s'", LIT(name));
}
ac->init = true;
return true;
} else if (name == "fini") {
if (value != nullptr) {
- error(value, "'%.*s' expects no parameter, or a string literal containing \"file\" or \"package\"", LIT(name));
+ error(value, "Expected no value for '%.*s'", LIT(name));
}
ac->fini = true;
return true;