aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzesimir Nowak <qdlacz@gmail.com>2025-12-21 18:59:21 +0100
committerKrzesimir Nowak <qdlacz@gmail.com>2025-12-21 18:59:26 +0100
commit8ca7fc481fad1a335b5ca46b9f997396df9be1aa (patch)
treede79b460f2c1485a3929ecea8db2a7607adf9bf7
parentcb2f3aca8b63ca59f63cf794c767096860990f6e (diff)
Fix misleading error messages for init, fini and test attributes
These look like copy-pasta from the private attribute.
-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;