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

jsonread function in InterTypes recognizes the sum type not the variant type #85

Closed
p-stokes opened this issue Dec 1, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@p-stokes
Copy link
Contributor

p-stokes commented Dec 1, 2023

Currently, the jsonread function in InterTypes recognizes the type as the sum type. Shouldn't it recognize it as the variant type?

For example, in the test case below, jsonread reads t as a Term not as a Plus.

@intertypes "simpleast.it" module simpleast end
using .simpleast
t = Plus([Constant(ConstInt(1)), Constant(ConstInt(2))])
s = jsonwrite(t)
@test s isa String
@test jsonread(s, Term) == t
@p-stokes p-stokes added the bug Something isn't working label Dec 1, 2023
olynch added a commit that referenced this issue Jan 24, 2024
@olynch olynch closed this as completed Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants