Skip to content

switch and $switch inconsisteny #35

Description

@Jamesinvi

Hi,
I noticed that switch cases will remain on the same line if the case is a one liner, like so, but will not align vertically like assignments:

switch (test):
     case A: fn(foo);
     case B_T: fn(bar);

Compile time switch cases. however, will always go to a new line:

$switch $test:
    $case A:
        fn(foo);
    $case B_T:
        fn(bar);

Is this intentional?
Would it be possible to have one-line cases align vertically?
Would it be possible to have the same behaviour for both runtime and compile time switches?
I'm sorry if my etiquette is off, creating issues on GitHub is a new thing for me
Thanks for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions