Skip to content
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

Fix a false flag issue with InvalidConstantAssignmentValue #10738

Merged

Commits on Feb 23, 2024

  1. Fix a false flag issue with InvalidConstantAssignmentValue being thro…

    …wn for constants over a certain length. Usually happens with arrays or lists over 100+ entries in length.
    
    Check if this type was defined via a dockblock or type hint otherwise the inferred type should always match the assigned type, and we don't even need to do additional checks
    There is an issue with constants over a certain length where additional values are added to fallback_params in the assigned_type but not in const_storage_type which causes a false flag for this error to appear. Usually happens with arrays/lists.
    
    Added two separate tests to cover both lists, and arrays to ensure this issue is fixed.
    MelechMizrachi committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    f553392 View commit details
    Browse the repository at this point in the history