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

Implement support for has_attached_class! method #1514

Merged
merged 2 commits into from
May 26, 2023
Merged

Conversation

paracycle
Copy link
Member

@paracycle paracycle commented May 26, 2023

Motivation

Fixes #1513

Implementation

As implemented has_attached_class! is a generic construct, is defined on T::Generic, accepts the same parameters as type_member/type_template calls. So for all intents and purposes it is type variable without a name (or rather with an implicit, internal, name).

Thus, I implemented it as yet another type variable type, which gets serialized differently. The sorting order of has_attached_class! calls might not be grouped with type_member/type_template calls, but that is not important for supporting this feature.

Tests

Added test cases for the new syntax

@paracycle paracycle requested a review from a team as a code owner May 26, 2023 19:03
@paracycle paracycle merged commit d99e83d into main May 26, 2023
30 checks passed
@paracycle paracycle deleted the uk-has-attached-class branch May 26, 2023 20:33
@shopify-shipit shopify-shipit bot temporarily deployed to production June 23, 2023 18:32 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants