Files
kotlin-fork/idea/testData/intentions/moveOutOfCompanion/moveFunctionWithExternalRefs.kt
T
Alexey Sedunov aa0f0ef02d Presentation: Do not use resolve to compute element description
Invoking analysis on EDT may degrade editor performance
2017-04-17 23:00:08 +03:00

27 lines
538 B
Kotlin
Vendored

// WITH_RUNTIME
// SHOULD_FAIL_WITH: 'foo' in class B will require class instance, 'foo' in function test() will require class instance, 'foo' in function test() will require class instance, 'foo' in lambda <anonymous>() will require class instance
class A {
companion object {
class B {
init {
foo()
}
}
fun <caret>foo() {
}
}
fun bar() {
foo()
}
}
fun test() {
A.foo()
A.Companion.foo()
with(A) {
foo()
}
}