Skip to content

[NameLookup] Allow value generics to show up as static members #78248

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 8 commits into from
Apr 16, 2025

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Dec 17, 2024

Allow value generics, <let n: Int>, to be found using qualified name lookup on a type to appear as a static member. This returns the integer value of the parameter:

struct Generic<let count: Int> {}

func hello() -> Int {
  Generic<123>.count // returns 123
}

@Azoy
Copy link
Contributor Author

Azoy commented Dec 17, 2024

@swift-ci please test

@Azoy Azoy force-pushed the value-generic-static-member branch from 12551e7 to f5fe4b1 Compare December 17, 2024 21:59
@Azoy Azoy force-pushed the value-generic-static-member branch from f5fe4b1 to 281d83b Compare March 27, 2025 19:45
@Azoy Azoy requested review from a team and DougGregor as code owners March 27, 2025 19:45
@Azoy
Copy link
Contributor Author

Azoy commented Mar 27, 2025

@swift-ci please test

2 similar comments
@Azoy
Copy link
Contributor Author

Azoy commented Apr 1, 2025

@swift-ci please test

@Azoy
Copy link
Contributor Author

Azoy commented Apr 1, 2025

@swift-ci please test

@Azoy Azoy requested a review from AnthonyLatsis as a code owner April 3, 2025 21:52
@Azoy
Copy link
Contributor Author

Azoy commented Apr 3, 2025

@swift-ci please test

@Azoy Azoy force-pushed the value-generic-static-member branch from 3d7f458 to 906e9b5 Compare April 14, 2025 18:04
@Azoy
Copy link
Contributor Author

Azoy commented Apr 14, 2025

@swift-ci please test

@Azoy Azoy force-pushed the value-generic-static-member branch from 906e9b5 to 79a51df Compare April 14, 2025 22:33
@Azoy
Copy link
Contributor Author

Azoy commented Apr 14, 2025

@swift-ci please test

@Azoy
Copy link
Contributor Author

Azoy commented Apr 15, 2025

@swift-ci please test macOS

@Azoy
Copy link
Contributor Author

Azoy commented Apr 15, 2025

@swift-ci please test macOS

1 similar comment
@Azoy
Copy link
Contributor Author

Azoy commented Apr 15, 2025

@swift-ci please test macOS

@Azoy Azoy merged commit ace5c20 into swiftlang:main Apr 16, 2025
5 checks passed
@Azoy Azoy deleted the value-generic-static-member branch April 16, 2025 15:03
Azoy added a commit to Azoy/swift that referenced this pull request Apr 16, 2025
[NameLookup] Allow value generics to show up as static members
Azoy added a commit to Azoy/swift that referenced this pull request Apr 22, 2025
[NameLookup] Allow value generics to show up as static members
Azoy added a commit to Azoy/swift that referenced this pull request May 6, 2025
[NameLookup] Allow value generics to show up as static members
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