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

fix: Compilation of subset types constrained by type parameter #3893

Merged
merged 15 commits into from
May 4, 2023

Conversation

RustanLeino
Copy link
Collaborator

This PR fixes several issues (resolution, verification, and compilation to C#, Java, and Go) related to when a subset type is defined by one of its type parameters.

Fixes #3883
Fixes #3891
Fixes #3892

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

@RustanLeino RustanLeino marked this pull request as ready for review April 21, 2023 22:04
@RustanLeino RustanLeino enabled auto-merge (squash) April 21, 2023 22:04
@RustanLeino RustanLeino changed the title Issue 3883 fix: Compilation of subset types constrained by type parameter Apr 26, 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.

I'm not fully convinced there aren't more limitations hiding, especially for Java, but this is definitely a strict improvement and the testing coverage is more than enough for the changes, so I'm happy to get this in and revisit.


method Main() {
var a: MyType<int> := 13; // this used to not verify (issue #3891)
TestMyTest(a, 14); // 13 14 // this used to crash the resolved
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
TestMyTest(a, 14); // 13 14 // this used to crash the resolved
TestMyTest(a, 14); // 13 14 // this used to crash the resolver

@RustanLeino RustanLeino merged commit 38bd267 into dafny-lang:master May 4, 2023
RustanLeino added a commit that referenced this pull request May 5, 2023
Closes #2103

Issue #2103 was fixed as part of PR #3893.

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
@RustanLeino RustanLeino deleted the issue-3883 branch May 8, 2023 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants