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

Formatter does not indent properly when case is combined with a variable #15479

Open
BigBoyBarney opened this issue Feb 15, 2025 · 0 comments
Open
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc.

Comments

@BigBoyBarney
Copy link
Contributor

BigBoyBarney commented Feb 15, 2025

Hi!

Similar to #15421, combining with case does not indent properly either.

@[Flags]
enum Snorlax
  One
  Two
end

def test
  one = Snorlax::One

  one | case
  when true
    Snorlax::Two
  else
    Snorlax::Two
  end
end

p! test

instead of

def test
  one = Snorlax::One

  one | case
        when true
          Snorlax::Two
        else
          Snorlax::Two
        end
end

Thanks!

@BigBoyBarney BigBoyBarney added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Feb 15, 2025
@BigBoyBarney BigBoyBarney changed the title Formatter Formatter does not indent properly when case is combined with a variable Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc.
Projects
None yet
Development

No branches or pull requests

1 participant