-
Notifications
You must be signed in to change notification settings - Fork 509
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
Backing property requires other value to be part of public API #2345
Comments
- Provide better message when the backing property does not have a private modifier - Check that property correlated with the backing property is public Closes #2345
We can ignore this |
I am not sure whether I understand your question. As I read the documentation, a backing property requires a |
Yes, I meant if an Example: class Foo {
private val _foo = "foo"
internal val foo: String get() = _foo
} And maybe there is another case like: class Foo {
internal val _foo = "foo"
val foo: String get() = _foo
} Should we consider bypassing this? |
If we go this route, more exceptions will follow. The end result will be that properties can always start with an |
- Provide better message when the backing property does not have a private modifier - Check that property correlated with the backing property is public Closes #2345
According to Kotlin Coding conventions:
Currently it is not checked that the variable not starting with
_
is a part of thepublic
API. As a result the_elementList
property is code below is not reported:The text was updated successfully, but these errors were encountered: