Skip to content

Improve invalid cpp modifier message #12175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Zend/tests/ctor_promotion_additional_modifiers.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ class Test {

?>
--EXPECTF--
Fatal error: Cannot use the static modifier on a promoted property in %s on line %d
Fatal error: Cannot use the static modifier on a parameter in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/type_declarations/static_type_param.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class Test {

?>
--EXPECTF--
Fatal error: Cannot use the static modifier on a promoted property in %s on line %d
Fatal error: Cannot use the static modifier on a parameter in %s on line %d
2 changes: 1 addition & 1 deletion Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ uint32_t zend_modifier_token_to_flag(zend_modifier_target target, uint32_t token
} else if (target == ZEND_MODIFIER_TARGET_CONSTANT) {
member = "class constant";
} else if (target == ZEND_MODIFIER_TARGET_CPP) {
member = "promoted property";
member = "parameter";
} else {
ZEND_UNREACHABLE();
}
Expand Down