Problem in Kotlin when importing a class

Answered

Hello, 

I'm pretty new in Kotlin and IntelliJ and facing some strange behaviour in the IDE.

Whenever I try to use a new class in which the first part of the package name is the same as a variable the IDE wont create the proper import statement.

 

For Example: I have a small Project with several packages one path might be:

src/network/synapse/SynapseType.kt

in my main function my i type something like this :

val network = BasicNetwork();
SynapseType

When I'm using the autocomplete function on SynapseType it inserts:

network.synapse.SynapseType

instead of the expected 

import network.synapse.SynapseType

 

I'm using 

Windows 10,
IntelliJ IDEA 2017.2.6 Build #IU-172.4574.11,
JRE: 1.8.0_152-release-915-b12 amd64

with Kotlin Plugin Version: 1.1.60-release-IJ2017.2-1

 

Hopefully someone can help me with this issue.

Best regards,

Tim

0
3 comments

Please use https://discuss.kotlinlang.org/ for any questions related to Kotlin.

0
Avatar
Permanently deleted user

 Even though its something the IDE does ?

0

Please sign in to leave a comment.