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

Allow properties with context receivers in interfaces to omit declaring accessors #1575

Merged
merged 1 commit into from
May 29, 2023

Conversation

drawers
Copy link
Contributor

@drawers drawers commented May 25, 2023

Closes #1525

  • Move check for getters and setters on properties with context receivers into TypeSpec.kt
  • Disallow abstract properties in non-abstract types

@drawers drawers changed the title Fix #1525 Allow properties with context receivers in interfaces to omit declaring accessors May 25, 2023
Copy link
Collaborator

@Egorand Egorand left a comment

Choose a reason for hiding this comment

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

Thanks!

Too bad we can't perform all of these checks when creating the PropertySpec, but it seems that we don't have enough context until we add that property to a TypeSpec. We can perform part of the checks inside PropertySpec's constructor (i.e. has an abstract modifier, context receivers and no getters/setters - fail), but not sure whether there's value in splitting these checks between multiple types and thus complicating logic.

@Egorand Egorand merged commit 2c3dbb8 into square:master May 29, 2023
@drawers drawers deleted the fix/1525 branch June 3, 2023 08:14
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.

Allow PropertySpec with context receivers and without getter or setter
2 participants