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

Allow cardinality to be treated as long in Java #4484

Merged
merged 6 commits into from
Aug 30, 2023

Conversation

atomb
Copy link
Member

@atomb atomb commented Aug 28, 2023

Previously, using the cardinality of a collection in a context where it would be compiled to a long in Java led to a type error from the Java compiler. This change ensures that the necessary cast is inserted.

Fixes #4483

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@atomb atomb marked this pull request as ready for review August 28, 2023 21:42
@atomb atomb requested a review from robin-aws August 28, 2023 21:42
@atomb atomb enabled auto-merge (squash) August 28, 2023 22:40
@atomb atomb self-assigned this Aug 28, 2023
Copy link
Member

@robin-aws robin-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix certainly LGTM, but please do add the issue repro as a test case (especially as I'm curious to see if this fails in any other languages :)

@atomb atomb requested a review from robin-aws August 29, 2023 00:01
@atomb atomb merged commit 53d6fc3 into dafny-lang:master Aug 30, 2023
18 checks passed
@atomb atomb deleted the java-cardinality-long branch August 30, 2023 18:32
keyboardDrummer pushed a commit to keyboardDrummer/dafny that referenced this pull request Sep 15, 2023
Previously, using the cardinality of a collection in a context where it
would be compiled to a `long` in Java led to a type error from the Java
compiler. This change ensures that the necessary cast is inserted.

Fixes dafny-lang#4483

By submitting this pull request, I confirm that my contribution
is made under the terms of the MIT license.
keyboardDrummer pushed a commit that referenced this pull request Sep 19, 2023
Previously, using the cardinality of a collection in a context where it
would be compiled to a `long` in Java led to a type error from the Java
compiler. This change ensures that the necessary cast is inserted.

Fixes #4483

By submitting this pull request, I confirm that my contribution
is made under the terms of the MIT license.
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.

Error when collection cardinality used as a long in Java
3 participants