Report UNINITIALIZED_VARIABLE also for qualified object property #KT-12809 Fixed
(cherry picked from commit 7b2857f)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
35446037bb
commit
0c98231f53
@@ -0,0 +1,16 @@
|
||||
object O {
|
||||
// This is correct, foo is the same
|
||||
tailrec fun foo(i: Int): Int = if (i < 0) 0 else O.foo(i - 1)
|
||||
}
|
||||
|
||||
class A {
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo(i: Int)<!> = if (i < 0) 0 else A.foo(i - 1)
|
||||
|
||||
companion object {
|
||||
fun foo(i: Int) = 42 + i
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo(i: Int)<!> = if (i < 0) 0 else O.foo(i - 1)
|
||||
}
|
||||
Reference in New Issue
Block a user