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
Property with declared type 'numeric' cannot be assigned type 'string(0)' #4154
Labels
Comments
I found these snippets: https://psalm.dev/r/d6e5661e12<?php
final class Request
{
/**
* @psalm-var numeric
*/
public $index = '0';
/**
* @psalm-var numeric
*/
public $index = 0;
/**
* @psalm-var numeric
*/
public $index = 0.5;
}
|
Also it makes sense to flag duplicate properties. |
Reproduced without duplicates: https://psalm.dev/r/f1094923dd |
I found these snippets: https://psalm.dev/r/f1094923dd<?php
final class Request
{
/**
* @psalm-var numeric
*/
public $index = '0';
}
|
muglug
added a commit
that referenced
this issue
Sep 8, 2020
danog
pushed a commit
to danog/psalm
that referenced
this issue
Jan 29, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://psalm.dev/r/d6e5661e12
The text was updated successfully, but these errors were encountered: