koin
koin copied to clipboard
Koin Extended DSL (3.2) Import Bug
Android Studio Dolphin | 2021.3.1 Beta 5
Build #AI-213.7172.25.2113.8774922, built on June 28, 2022
Runtime version: 11.0.14.1+1-b1751.46 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry:
external.system.auto.import.disabled=true
debugger.watches.in.variables=false
ide.text.editor.with.preview.show.floating.toolbar=false
ide.instant.shutdown=false
ide.balloon.shadow.size=0
I like the new DSL 3.2 BUT
- If you type
singleOf(::ClassA)or any other, the Import ofClassAdoes not happen! you have to either import it by hand OR use the classic DSLsingle (ClassA())to get the import first then convert it!!
The import does not work because you're starting with the :: part first, which tells the IDE that you do not want imports after the operator. The solution is to write the class name first (skipping the scope resolution operator), accept the suggested import, then go back one word and insert the :: part.