Property accessor isn't recursive when called on another object

So #KT-18120 Fixed
This commit is contained in:
Dmitry Neverov
2017-06-04 12:25:34 +03:00
committed by Mikhail Glukhikh
parent ecfc2236a6
commit e2aa3518df
3 changed files with 29 additions and 0 deletions
@@ -116,4 +116,13 @@
<description>Recursive property accessor</description>
</problem>
<problem>
<file>recursivePropertyAccessors.kt</file>
<line>45</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/recursivePropertyAccessors.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Recursive property accessor</problem_class>
<description>Recursive property accessor</description>
</problem>
</problems>
@@ -38,4 +38,14 @@ class A {
A.g = 99
}
}
}
object Obj {
val s: String
get() = Obj.s
}
class Node(val next: Node?) {
val last: Node
get() = if (next != null) next.last else this
}