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

Invalid state for bit operations #4116

Closed
timothyklim opened this issue Jul 25, 2024 · 3 comments · Fixed by #4118
Closed

Invalid state for bit operations #4116

timothyklim opened this issue Jul 25, 2024 · 3 comments · Fixed by #4118

Comments

@timothyklim
Copy link

Steps

Given code like this:

(~validByte).toByte

Problem

Scalafmt formats code like this:

~validByte.toByte

and makes code broken because for scalac its like ~(validByte.toByte) and expression become as Int type.

Expectation

I would like the formatted output to look like this:

(~validByte).toByte

Notes

version: 3.8.3

@kitbellew
Copy link
Collaborator

@timothyklim do you believe your submission, as formulated, is reproducible? would you perhaps like to revise it to include everything that was mandatory in the issue template?

@timothyklim
Copy link
Author

@timothyklim do you believe your submission, as formulated, is reproducible? would you perhaps like to revise it to include everything that was mandatory in the issue template?

Sorry sorry, I forgot that part:

version = 3.8.3

rewrite.rules = [RedundantParens]

runner.dialect = scala3future

@timothyklim
Copy link
Author

version = 3.8.3

version = 3.8.2 works fine with that code

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

Successfully merging a pull request may close this issue.

2 participants