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

Fix the invalid error for readonly record types #45

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

SasinduDilshara
Copy link
Contributor

Purpose

Fixes: ballerina-platform/ballerina-library#7253
Fixes: ballerina-platform/ballerina-library#7254

Examples

Checklist

  • Linked to an issue
  • Added tests

ReadOnlyUser r = check parseString(user);
test:assertEquals(r, {id: 4012});
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add more tests with

  • members of selectively-immutable types that become immutable because the type it is in is immutable - e.g., like the id field, but with a selectively-immutable type
  • field of a readonly intersection type in a mutable type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added tests for these scenarios.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please point to the relevant tests for each of these cases?

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