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: Disambiguation priority not preserved when importing modules #5498

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

stefan-aws
Copy link
Collaborator

@stefan-aws stefan-aws commented May 28, 2024

Fixes #4364.

Description

The author of the issue argues that the types of x on line 12 and 21 should both be of type int (currently one is of type T and one of type int). I agree that the types should coincide, but believe they should both be T and not int. This is my impression since https://dafny.org/latest/DafnyRef/DafnyRef#483-expression-context-name-resolution indicates that one should look for a datatype constructor before matching a function. I believe the difference between documentation and implementation is due to an incorrect triggering of case 2 if there is no surrounding class (that is currentClass is DefaultClassDecl).

How has this been tested?

I've added two test files that clarify the initial problem documented in the issue.

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

@stefan-aws stefan-aws linked an issue May 28, 2024 that may be closed by this pull request
@stefan-aws stefan-aws marked this pull request as draft May 28, 2024 14:31
@stefan-aws stefan-aws marked this pull request as ready for review May 28, 2024 14:39
Copy link
Member

@keyboardDrummer keyboardDrummer left a comment

Choose a reason for hiding this comment

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

If you're fixing something, could you add a test that shows what is being fixed, and if available, link to the issue being fixed?

@stefan-aws stefan-aws marked this pull request as draft May 28, 2024 15:03
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.

Disambiguation priority not preserved when importing modules
2 participants