You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an extension function like this to allow you to say something like now..<5.minutes to get an open ended range of instants:
/**
* Convenience method to convert an instant and a duration into an open-ended range of instants. For
* example: `now..<5.minutes` produces an open-ended range from now until 5 minutes from now
*
* @receiver The starting instant of the range
* @param duration The amount of time to add to the starting time to get the end of the range
* @return An open-ended range that starts at `this` and ends before `this + duration`
*/
operator fun Instant.rangeUntil(duration: Duration): OpenEndRange<Instant> = this..<this + duration
Expected Behavior
When I add an import in another file to use this operator, ktlint should know that ..< corresponds to the rangeUntil function name and should not report the import of the rangeUntil name as unused
Observed Behavior
Ktlint reports an unused import on the rangeUntil operator
Steps to Reproduce
Define a rangeUntil extension operator function in one file and import it and use it in another file
The text was updated successfully, but these errors were encountered:
I have an extension function like this to allow you to say something like
now..<5.minutes
to get an open ended range of instants:Expected Behavior
When I add an import in another file to use this operator, ktlint should know that ..< corresponds to the rangeUntil function name and should not report the import of the rangeUntil name as unused
Observed Behavior
Ktlint reports an unused import on the rangeUntil operator
Steps to Reproduce
Define a rangeUntil extension operator function in one file and import it and use it in another file
The text was updated successfully, but these errors were encountered: