mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-03 19:52:30 +00:00
Fix misleading error messages for init, fini and test attributes
These look like copy-pasta from the private attribute.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user