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

CUSTOM_GETTERS_SETTERS false positive on the override of fields #1504

Closed
orchestr7 opened this issue Aug 16, 2022 · 0 comments · Fixed by #1606
Closed

CUSTOM_GETTERS_SETTERS false positive on the override of fields #1504

orchestr7 opened this issue Aug 16, 2022 · 0 comments · Fixed by #1606
Assignees
Labels
bug Something isn't working
Milestone

Comments

@orchestr7
Copy link
Member

orchestr7 commented Aug 16, 2022

interface A {
    val a: Int
}

object B: A {
    override a: int 
        get() = 0
}

In interface you should always use getters with backing-fields. SO if we see override modifier - we should not raise a warning

@orchestr7 orchestr7 added the bug Something isn't working label Aug 16, 2022
@orchestr7 orchestr7 self-assigned this Aug 16, 2022
@orchestr7 orchestr7 changed the title CUSTOM_GETTERS_SETTERS false positive on the override of CUSTOM_GETTERS_SETTERS false positive on the override of fields Aug 16, 2022
Cheshiriks added a commit that referenced this issue Feb 1, 2023
### What's done:
* added check for override getter

Closes #1504
@kgevorkyan kgevorkyan assigned Cheshiriks and unassigned orchestr7 Feb 1, 2023
Cheshiriks added a commit that referenced this issue Feb 1, 2023
### What's done:
* added check for override getter

Closes #1504
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added this to the 1.2.5 milestone Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants