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

SelfAssignment false positive with casting a float variable to int #4437

Open
DevCharly opened this issue Jun 14, 2024 · 1 comment
Open

Comments

@DevCharly
Copy link

Description of the problem:

The SelfAssignment checker complains about following:

float width = 123.456f;

width = (int) width;

// value of width is now 123

What version of Error Prone are you using?

2.28.0

@cushon
Copy link
Collaborator

cushon commented Jun 14, 2024

Some previous discussion in #2196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants