Suppose I want to use `for (date in d1..d2)` where...
# announcements
j
Suppose I want to use
for (date in d1..d2)
where d1 and d2 are instances of java.time.LocalDate. I can do that by defining an extension function
operator fun ClosedRange<LocalDate>.iterator()
. But is there a way to easily have that extension function imported in IntelliJ? Except for manually typing the import statement
import my.package.iterator
at the top of the file, I haven’t found a way, which makes it quite unintuitive to use such a for loop. Is there a better solution that I’m missing?
e
IDE should definitely suggest to auto-import the function in this case. File an issue? https://youtrack.jetbrains.com/newIssue
j
Thanks @egorand I will.