Skip to content

Preserve Element Order in Class Definitions #1477

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

Open
Sidd065 opened this issue Feb 18, 2025 · 1 comment · May be fixed by #1931
Open

Preserve Element Order in Class Definitions #1477

Sidd065 opened this issue Feb 18, 2025 · 1 comment · May be fixed by #1931
Assignees
Labels

Comments

@Sidd065
Copy link

Sidd065 commented Feb 18, 2025

When defining a class with multiple elements, the order in which those elements are declared is not always maintained in the generated output.

Example:

class Foo {
    x bar[]
}

class Bar {
    a string
    b string
    c string
}
function Func(input:Foo) -> Foo {
    client XYZ
    prompt "{{input}}"
}

The expected prompt is [{"a": "x", "b": "y", "c": "z"}]
But actual prompt can be [{"c": "z", "a": "x", "b": "y"}] or [{"b": "y", "c": "z", "a": "x"}]...

Copy link

linear bot commented Feb 18, 2025

@antoniosarosi antoniosarosi self-assigned this May 8, 2025
@antoniosarosi antoniosarosi added the friday label May 8, 2025 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants