I have a puzzling behavior: ```import kotlin.time...
# announcements
y
I have a puzzling behavior:
Copy code
import kotlin.time.*

class MyClass {
   // ...
    private var _timeSource = TimeSource.Monotonic
  // ...
}
results in
Unresolved reference: TimeSource
If I use
private var _timeSource = kotlin.time.TimeSource.Monotonic
, then it is fine. Any idea?
It is even weirder than it looks... It fails in this scenario:
Copy code
import kotlinx.coroutines.*
import kotlin.time.*

class MyClass {
   // ...
    private var _timeSource = TimeSource.Monotonic
  // ...
}
But it works in this one:
Copy code
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
import kotlin.time.*

class MyClass {
   // ...
    private var _timeSource = TimeSource.Monotonic
  // ...
}
e
There is a workaround for it in the upcoming release of kotlinx.coroutines 1.5.0: https://github.com/Kotlin/kotlinx.coroutines/issues/2691
y
Wow. That is so weird. Thanks!
I am no big fan of star import in any case and I just find a way in IDEA to only use single name import which obviously fixes the issue