Skip to content

Add bitwise Int compiletime operations #8377

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

Merged

Conversation

bishabosha
Copy link
Member

No description provided.

@bishabosha
Copy link
Member Author

not really sure why tests/pos/singleton-ops-test-issue-8280.scala broke

@panacekcz
Copy link
Contributor

(Hope you don't mind me chiming in, I clicked the pr wondering about this.)
It fails because the type scala.compiletime.ops.int.& shadows the intersection type scala.& in Int & Singleton.
Actually, the Syntax section at http://dotty.epfl.ch/docs/reference/new-types/intersection-types-spec.html should be updated, & seems to be just a normal identifier, not a soft keyword.

@smarter smarter requested review from OlivierBlanvillain and removed request for smarter February 26, 2020 14:57
@bishabosha
Copy link
Member Author

& seems to be just a normal identifier, not a soft keyword.

Ah yeah, that makes total sense

@bishabosha
Copy link
Member Author

what would be a more appropriate name for the int.& operation?

@OlivierBlanvillain
Copy link
Contributor

BitwiseAnd and BitwiseOr?

I would also be ok with the lazy solution which would be to just require people to always write int.& and int.|.

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 this pull request may close these issues.

5 participants