Allow private transient Kotlin properties.

This commit is contained in:
Eric Cochran
2018-06-06 17:12:29 -07:00
parent cd9e600955
commit 4666e06910
3 changed files with 33 additions and 15 deletions

View File

@@ -67,11 +67,6 @@ internal data class TargetProperty(
* cannot be used with code gen, or if no codegen is necessary for this property.
*/
fun generator(messager: Messager): PropertyGenerator? {
if (!isVisible) {
messager.printMessage(Diagnostic.Kind.ERROR, "property ${this} is not visible", element)
return null
}
if (isTransient) {
if (!hasDefault) {
messager.printMessage(
@@ -81,6 +76,11 @@ internal data class TargetProperty(
return null // This property is transient and has a default value. Ignore it.
}
if (!isVisible) {
messager.printMessage(Diagnostic.Kind.ERROR, "property ${this} is not visible", element)
return null
}
if (!isSettable) {
return null // This property is not settable. Ignore it.
}