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

Support union type #20

Merged
merged 13 commits into from
Jun 24, 2024
Merged

Conversation

prakanth97
Copy link
Contributor

Purpose

Fixes: #6261

Examples

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility

@prakanth97 prakanth97 marked this pull request as ready for review May 3, 2024 10:01
@prakanth97 prakanth97 requested a review from hasithaa as a code owner May 3, 2024 10:01
@SasinduDilshara
Copy link
Contributor

Shall we add a test with never and error

@prakanth97
Copy link
Contributor Author

Shall we add a test with never and error

Since both of these are not a subtype of anydata, we will get compile-time error.

Copy link

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@SasinduDilshara
Copy link
Contributor

Shall we add tests with a scenario that, union type as a expected type and it match not with source

@SasinduDilshara
Copy link
Contributor

Shall we add a test with union of singleton types

@prakanth97
Copy link
Contributor Author

Shall we add a test with union of singleton types

Already we have test for that https://github.com/ballerina-platform/module-ballerina-data.jsondata/blob/main/ballerina/tests/from_json_string_test.bal#L1051

@SasinduDilshara SasinduDilshara merged commit 552cf40 into ballerina-platform:main Jun 24, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

Support Union types as expected type for JSON data module
3 participants