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: Fix new resolution of unary minus #4737

Merged
merged 9 commits into from
Jan 3, 2024

Conversation

RustanLeino
Copy link
Collaborator

Previously, an expression -d could be typed as nat given d: nat. This caused a verification error, trying to prove that the result is a nat. This PR fixes this problem in the new resolver.

Note, the old resolver still has this problem, but it's more difficult to fix there. Thus, this PR solves the problem just for the new resolver (and I propose we ignore the problem in the old resolver, since we'll be switching everything over to the new resolver in the not too distant future).

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

@RustanLeino RustanLeino enabled auto-merge (squash) November 2, 2023 23:06
# Conflicts:
#	Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeInferenceRefresh.dfy
@RustanLeino RustanLeino merged commit c51f791 into dafny-lang:master Jan 3, 2024
20 checks passed
@RustanLeino RustanLeino deleted the fix-unary-minus branch January 3, 2024 23:09
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.

None yet

2 participants