Skip to content

[SwiftLexicalLookup][GSoC] Fix Swift 5.8 compatibility and update documentation. #2755

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

Merged
merged 4 commits into from
Jul 29, 2024

Conversation

MAJKFL
Copy link
Contributor

@MAJKFL MAJKFL commented Jul 26, 2024

This PR addresses requested changes by @ahoppen from #2719 that were not included before its merging. Those include mainly fixing Swift 5.8 compatibility and documentation enhancements.

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the comments in a separate PR @MAJKFL! That makes it a lot easier to review and I hope that it’s not too much trouble if you have merge conflicts with #2719.

Out-of-scope for this follow-up PR but still open from #2719 (mostly so I can find it again)

Comment on lines 114 to 116
func does(name: String?, referTo introducedName: LookupName, at syntax: SyntaxProtocol) -> Bool {
introducedName.isAccessible(at: syntax) && (name == nil || introducedName.refersTo(name!))
}
Copy link
Member

Choose a reason for hiding this comment

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

I can’t say that I’m a fan of having does as the base name of a function. Was the a specific reason why you extracted this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What would you say about checkName( , refersTo: ,at: )? It doesn't really do much in this PR, but once we start modeling more complex scopes (like in #2748) this method will be used all over the place so it's convenient to have it extracted.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see. checkName sounds good to me.

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Jul 26, 2024

Would you like to also include the test case from #2719 (comment) in this PR?

I already added a test case for let a = 42, a = a here.

Could you also address #2719 (comment)

Thank you for catching the missing doc. I missed it when copying the changes from #2748

@MAJKFL MAJKFL requested a review from ahoppen July 26, 2024 18:18
Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Thank you! Changes look great to me

@ahoppen
Copy link
Member

ahoppen commented Jul 26, 2024

@swift-ci Please test

@DougGregor
Copy link
Member

@swift-ci Please test

@DougGregor
Copy link
Member

@swift-ci Please test Windows

@DougGregor
Copy link
Member

@MAJKFL any reason not to merge this now?

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Jul 29, 2024

I don't have anything more to add. I think it should be good to go.

@DougGregor DougGregor merged commit 26d84ab into swiftlang:main Jul 29, 2024
3 checks passed
@DougGregor
Copy link
Member

Okay, merged!

MAJKFL added a commit to MAJKFL/swift-syntax that referenced this pull request Jul 30, 2024
MAJKFL added a commit to MAJKFL/swift-syntax that referenced this pull request Jul 30, 2024
@MAJKFL MAJKFL deleted the fix-swift5.8-compatibility branch October 16, 2024 11:23
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.

3 participants