Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacing around ..< should be identical to spacing around .. #1858

Closed
paul-dingemans opened this issue Mar 14, 2023 · 0 comments · Fixed by #1859
Closed

Spacing around ..< should be identical to spacing around .. #1858

paul-dingemans opened this issue Mar 14, 2023 · 0 comments · Fixed by #1859
Milestone

Comments

@paul-dingemans
Copy link
Collaborator

Given code below with inconsistent spacing around ..<:

@OptIn(ExperimentalStdlibApi::class)
fun foo(int: Int): String =
    when (int) {
        in 10..<20 -> "A"
        in 20..< 30 -> "B"
        in 30 ..< 40 -> "C"
        in 40 ..<50 -> "D"
        else -> "unknown"
    }

should be formatted as:

@OptIn(ExperimentalStdlibApi::class)
fun foo(int: Int): String =
    when (int) {
        in 10..<20 -> "A"
        in 20..<30 -> "B"
        in 30..<40 -> "C"
        in 40..<50 -> "D"
        else -> "unknown"
    }
@paul-dingemans paul-dingemans added this to the 0.49.0 milestone Mar 14, 2023
paul-dingemans added a commit that referenced this issue Mar 14, 2023
paul-dingemans added a commit that referenced this issue Mar 16, 2023
* Enforce spacing around rangeUntil operator `..<` similar to the range operator `..` in `range-spacing`

Closes #1858
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant