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

primitive unnecessary cast #538

Closed
asashour opened this issue Mar 29, 2019 · 1 comment
Closed

primitive unnecessary cast #538

asashour opened this issue Mar 29, 2019 · 1 comment

Comments

@asashour
Copy link
Contributor

asashour commented Mar 29, 2019

Consider the below examples:

new byte[]{10, 11, 12}

and

byte[] arr = new byte[3];
arr[2] = 10;

Currently, they are being generated as:

new byte[]{(byte) 10, (byte) 11, (byte) 12}

and

byte[] arr = new byte[3];
arr[2] = (byte) 10;

This should be also fixed for other primitive types.

@skylot
Copy link
Owner

skylot commented Mar 29, 2019

@asashour I know I made such cast on purpose, but now I don't remember why :(
Maybe because of issues in previous Java versions. Anyway, if tests are pass we are good :)

This issue was closed.
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