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 revealing using a static receiver #5760

Merged
merged 7 commits into from
Sep 10, 2024

Conversation

keyboardDrummer
Copy link
Member

Description

Allow revealing using a static receiver

How has this been tested?

Added the test revealQualifiedId.dfy

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

@keyboardDrummer keyboardDrummer marked this pull request as ready for review September 10, 2024 12:36
@keyboardDrummer keyboardDrummer enabled auto-merge (squash) September 10, 2024 12:38
Copy link
Member

@MikaelMayer MikaelMayer left a comment

Choose a reason for hiding this comment

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

Just a minor comment for release notes.

@@ -96,7 +96,7 @@ public void Resolve(PreTypeResolver resolver, ResolutionContext resolutionContex
if (effectiveExpr is NameSegment) {
resolver.ResolveNameSegment((NameSegment)effectiveExpr, true, null, resolutionContext, true);
} else {
resolver.ResolveDotSuffix((ExprDotName)effectiveExpr, true, null, resolutionContext, true);
resolver.ResolveDotSuffix((ExprDotName)effectiveExpr, true, true, null, resolutionContext, true);
Copy link
Member

Choose a reason for hiding this comment

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

These boolean flags are hard to review on GitHub, Non blocking for this one, but I would encourage in the future that we switch to enums when it's not obvious what a boolean is about. For example, StaticReferenceToInstance.Allowed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm a bit conflicted on this. There's also a third option of adding the argument name, so it would say allowStaticReferenceToInstance: true. Possibly you could configure a linter to always require the argument name for booleans.

docs/dev/news/5760.fix Outdated Show resolved Hide resolved
Co-authored-by: Mikaël Mayer <[email protected]>
Copy link
Member

@MikaelMayer MikaelMayer left a comment

Choose a reason for hiding this comment

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

Looks great to me !

@keyboardDrummer keyboardDrummer merged commit 7af458b into dafny-lang:master Sep 10, 2024
22 checks passed
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.

2 participants