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

With syntax + invalid field #4665

Open
Gekctek opened this issue Aug 18, 2024 · 0 comments
Open

With syntax + invalid field #4665

Gekctek opened this issue Aug 18, 2024 · 0 comments

Comments

@Gekctek
Copy link
Contributor

Gekctek commented Aug 18, 2024

A common issue i come across with my coding is trying to clone a type and change one field with 'with' syntax like

character := {
    character with
    items = newItemIds;
};

but i had done a rename/made a typo, but i get no warning/error

It really should be itemIds, not items, so essentially the character is just cloned, and the new field is discarded

character := {
    character with
    itemIds = newItemIds;
};

i guess it kinda ties in with another issue which i think i logged about just setting fields that are immediately discarded on type creation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant