Files
kotlin-fork/idea/resources/inspectionDescriptions/RecursivePropertyAccessor.html
T

22 lines
463 B
HTML

<html>
<body>
This inspection reports recursive property accessor calls which can end up with a <b>StackOverflowError</b>. For example:
<br /><br />
<pre>
<b>class</b> A {
<b>var</b> x = 0
<b>get</b>() {
<b>return</b> x //recursive getter call
}
<b>var</b> y = 0
<b>set</b>(value) {
<b>if</b> (value > 0) {
y = value //recursive setter call
}
}
}
</pre>
</body>
</html>