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

[Bug]: Formatter adds a space before colon when formatting a computed field key #41923

Closed
poorna2152 opened this issue Jan 2, 2024 · 1 comment · Fixed by #41932
Closed
Assignees
Labels
Area/Formatting Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug
Milestone

Comments

@poorna2152
Copy link
Contributor

Description

$title

Steps to Reproduce

Consider the following code,

function main() {
    map<string>? _ = {[NAME]: "Amy"};
}

After formatting,

function main() {
    map<string>? _ = {[NAME] : "Amy"};
}

There is a space between the ] and the :

Affected Version(s)

2201.8.4

OS, DB, other environment details and versions

No response

Related area

-> Formatter

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added the Team/CompilerFETools Semantic API, Formatter, Shell label Jan 2, 2024
@poorna2152 poorna2152 added Area/Formatting Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. and removed Team/CompilerFETools Semantic API, Formatter, Shell labels Jan 2, 2024
@poorna2152 poorna2152 self-assigned this Jan 4, 2024
Copy link

github-actions bot commented Jan 5, 2024

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

@lochana-chathura lochana-chathura added this to the 2201.8.5 milestone Jan 5, 2024
@lochana-chathura lochana-chathura added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Jan 5, 2024
@lochana-chathura lochana-chathura modified the milestones: 2201.8.5, 2201.9.0 Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Formatting Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants