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
Swift: Add and use AbstractFunctionDecl.hasGlobalName predicate. #11034
base: main
Are you sure you want to change the base?
Conversation
|
Is "global" the right terminology in a language that uses modules? After all, the function isn't global in the same sense that it's global in C/C++ since the function has an (implicit) enclosing module. |
|
You're right. Another name for non-methods could be "free" functions instead of "global". But |
I'm happy with either. @MathiasVP which do you prefer? |
I think I like |
|
Updated. And fixed the merge conflict. And I've added a bit more qldoc, though I'm not expecting to win any awards for: |
|
("A function" is actually not saying nothing in this case; it's saying "Yeah, don't worry about that funky name |
Good point. That name should be changed eventually as well, though. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This allows us to concisely match a non-member function. At the moment its only used in one place but I expect there will be a lot more of this in future.