Replace deprecated symbol usage: do not add 'this' receiver for imported object function

#KT-26361 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-10-13 13:28:19 +09:00
committed by Dmitry Gridin
parent 9d27ba5b59
commit bcefee0105
6 changed files with 114 additions and 13 deletions
@@ -0,0 +1,22 @@
// "Replace with 'stopKoin()'" "true"
// WITH_RUNTIME
package com.example.pkg
import com.example.pkg.StandAloneContext.closeKoin
import com.example.pkg.StandAloneContext.stopKoin
object StandAloneContext {
@Deprecated(
"Renamed, use stopKoin() instead.",
ReplaceWith("stopKoin()", "com.example.pkg.StandAloneContext.stopKoin")
)
fun closeKoin() = stopKoin()
fun stopKoin() {}
}
fun koin() {
stopKoin()
}