-
Notifications
You must be signed in to change notification settings - Fork 267
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
Allow revealing using a static receiver #5760
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
Co-authored-by: Mikaël Mayer <[email protected]>
There was a problem hiding this 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 !
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.