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]: Can't use a string literal key in a mapping constructor for a field with a name that has an identifier escape #41635

Open
MaryamZi opened this issue Nov 3, 2023 · 0 comments
Assignees
Labels
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

Comments

@MaryamZi
Copy link
Member

MaryamZi commented Nov 3, 2023

Description

$title.

Steps to Reproduce

type R1 record {|
    int first_index;
|};

type R2 record {|
    int first\-index;
|};

public function main() {
    R1 _ = {first_index: 1}; // OK
    R1 _ = {"first_index": 1}; // OK

    R2 _ = {first\-index: 1}; // OK
    R2 _ = {"first-index": 1}; // error
}

Affected Version(s)

2201.8.0

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@MaryamZi MaryamZi added Type/Bug Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Nov 3, 2023
@poorna2152 poorna2152 self-assigned this Nov 29, 2023
@gimantha gimantha added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Sep 19, 2024
@poorna2152 poorna2152 reopened this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

No branches or pull requests

3 participants