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

Fix assigned static properties #196

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

rhysm94
Copy link
Contributor

@rhysm94 rhysm94 commented Mar 15, 2024

Ensures that the @DependencyClient macro doesn't attempt to do anything with static properties.
The macro bails out of looking a specific member property if the member is static. Wouldn't make sense to try and include them in the initialiser or add the @DependencyEndpoint to them, so I figured it was worth just bailing as quickly as possible on them.

I did notice that some of the other unit tests, the DependencyEndpoint tests, are failing. They were failing before I did any of this work though.

As discussed in the Slack, without this, assigned static properties in the form: static var prop = SomeValue() will crash the compiler, as they're treated the exact same as var prop: SomeValue = SomeValue().

image

Copy link
Member

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

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

Thanks!

@stephencelis stephencelis merged commit 083ff59 into pointfreeco:main Mar 15, 2024
7 checks passed
@rhysm94 rhysm94 deleted the fix-static-vars branch March 19, 2024 19:11
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.

None yet

2 participants