Intentions: Move member of companion object to corresponding class

#KT-9697 Fixed
This commit is contained in:
Alexey Sedunov
2016-02-03 14:31:55 +03:00
parent d13ac6b5a4
commit 5f037d372d
22 changed files with 310 additions and 3 deletions
@@ -0,0 +1,25 @@
// WITH_RUNTIME
// SHOULD_FAIL_WITH: Class instance required: foo, Class instance required: foo, Class instance required: foo, Class instance required: foo
class A {
companion object {
class B {
init {
foo + 1
}
}
val <caret>foo: Int = 1
}
fun bar() {
foo + 1
}
}
fun test() {
A.foo + 1
A.Companion.foo + 1
with(A) {
foo + 1
}
}