You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, the relevant syntactic construct spans multiple lines starting from line 3, and the error message reports line 3, which is the starting line of that construct. Therefore, this is by design and not a bug.
This behavior is deeply tied to the behavior of the AST, so it's not something that can be easily changed.
If you are determined to request a change to this behavior, it is recommended to submit your opinion to the internal mailing list.
Activity
SakiTakamachi commentedon Jul 10, 2025
In this case, the relevant syntactic construct spans multiple lines starting from line 3, and the error message reports line 3, which is the starting line of that construct. Therefore, this is by design and not a bug.
This behavior is deeply tied to the behavior of the AST, so it's not something that can be easily changed.
If you are determined to request a change to this behavior, it is recommended to submit your opinion to the internal mailing list.
Thank you.
iluuu1994 commentedon Jul 10, 2025
Not sure this is accurate. We have the information in the AST, but we don't update
CG(zend_lineno)to adjust the position in the error message.This seems to work.
SakiTakamachi commentedon Jul 10, 2025
@iluuu1994
Thank you.
Do you think this should be considered a bug?
iluuu1994 commentedon Jul 10, 2025
No, but a feature request (i.e. master) should be fine.
Adjust lineno for promoted properties
Fix lineno for constructor property promotion errors