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
Do phan --init, then run phan --plugin DuplicateArrayKeyPlugin test.php
Expected results
Errors reported on either the line of the array( or the line of the first element, e.g.
test.php:4 PhanPluginMixedKeyNoKey Should not mix array entries of the form [key => value,] with entries of the form [value,].
test.php:9 PhanPluginMixedKeyNoKey Should not mix array entries of the form [key => value,] with entries of the form [value,].
Actual results
For the nested array, the error is reported on the line of the first element of the nested array, even though that array does not have the problem.
test.php:4 PhanPluginMixedKeyNoKey Should not mix array entries of the form [key => value,] with entries of the form [value,].
test.php:10 PhanPluginMixedKeyNoKey Should not mix array entries of the form [key => value,] with entries of the form [value,].
Other notes
Probably the real bug is somewhere in PHP itself, putting the wrong line number in the AST. No idea where to begin reporting that though.
The text was updated successfully, but these errors were encountered:
Phan version: 5.4.3, v5.x-dev 790e4f7
php-ast version: 1.1.1
Reproduction
phan --init
, then runphan --plugin DuplicateArrayKeyPlugin test.php
Expected results
Errors reported on either the line of the
array(
or the line of the first element, e.g.Actual results
For the nested array, the error is reported on the line of the first element of the nested array, even though that array does not have the problem.
Other notes
Probably the real bug is somewhere in PHP itself, putting the wrong line number in the AST. No idea where to begin reporting that though.
The text was updated successfully, but these errors were encountered: