https://bugs.kde.org/show_bug.cgi?id=505187

            Bug ID: 505187
           Summary: Nested switchs don't behave correctly
    Classification: Applications
           Product: kdevelop
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Astyle
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
When inside a case in a switch there's another switch the alignment doesn't
goes back to where it should go

STEPS TO REPRODUCE
1.  Create a switch-case.
2.  Inside a case create another switch-case.
3.  Add a case after the end of the nested switch-case.

OBSERVED RESULT
The indentation doesn't takes into account that the inner switch-case has ended
and the next outer case uses the inner case indent.

switch (a)
{
    case 0:
        break;
    case 1:
        break;
    case 2:
        switch(b)
        {
            case 0:
                break;
            case 1:
                break;
        }
        break;
            case 3:
                break;
}

EXPECTED RESULT
The outer case after closing the inner switch-case should be at the same
indentation level as the case before the nested switch-case.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Raspberry Pi OS Bookworm
KDE Plasma Version: 5.27.5-2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to