Skip to content

CGSwitchStatement: Pascal: generate one line statement without begin/end #19

Description

@evgeny-k

Oxygene:

  • now:
  case aIndex of
    0: begin
        exit 'NewName';
      end;
    else begin
      exit nil;
    end;
  end;
  • suggested:
  case aIndex of
    0: exit 'NewName';
  else 
    exit nil;    
  end;

C#:

the same is generated correctly:

switch (aIndex)
{
        case 0:
                return "NewName";
        default:
                return null;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions