shiraji
07/27/2016, 8:29 PMclass Lateinit {
lateinit var x: String
constructor() {
x = ""
}
constructor(a: Int): this() {
x = ""
}
}
Then check both secondary constructor’s getBodyExpression() and it works fine. However,
class Lateinit {
lateinit var x: String
constructor() {
x = ""
}
constructor(a: Int): this() {
}
constructor(a: Int, b: Int): this(a) {
printf(b)
}
}
This case when the inspection checks second/third secondary constructors, I need somehow get first secondary constructor’s body expression. The only information I have is
* First secondary constructor has assignment expression
* Second secondary constructor has this() delegation call and bodyExpression.children is empty
* Third secondary constructor has this(a) delegation call and bodyExpression.children contains printf(b).