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

from_json test on roundtripping double fails #8

Open
glyh opened this issue Sep 11, 2024 · 3 comments
Open

from_json test on roundtripping double fails #8

glyh opened this issue Sep 11, 2024 · 3 comments

Comments

@glyh
Copy link

glyh commented Sep 11, 2024

Moonbit info:

moon 0.1.20240910 (0a5e0dc 2024-09-10)

System info:

Linux mechrevo 6.10.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 09 Sep 2024 02:38:45 +0000 x86_64 GNU/Linux

One of relvant code occurence:

inspect!(Syntax::from_json!(["Float", 1.0]), content="Double(1.0)")

test info:

test moonbitlang/minimbt/utils.mbt::1 failed
expect test failed at /home/lyh/Documents/Knowledge/CS/PL/Moonbit/minimoonbit/src/utils.mbt:340:3-345:4
Diff:
----
["App",["Var","f"],[["Int",1.0]]]
----

test moonbitlang/minimbt/utils.mbt::2 failed
expect test failed at /home/lyh/Documents/Knowledge/CS/PL/Moonbit/minimoonbit/src/utils.mbt:391:3-391:70
Diff:
----
Double(1.0)
----

Total tests: 3, passed: 1, failed: 2.
@glyh glyh changed the title from_json test failing from_json test failing to roundtrip double Sep 11, 2024
@glyh glyh changed the title from_json test failing to roundtrip double from_json test on roundtripping double fails Sep 11, 2024
@glyh
Copy link
Author

glyh commented Sep 11, 2024

Looks like this also occurs for any ints

@glyh
Copy link
Author

glyh commented Sep 11, 2024

建议在大赛中提供稳定版本的编译器套件

@lynzrand
Copy link
Collaborator

This was broken by a recent compiler update that changes Double::to_string implementation to match that specified in JavaScript. We will update this repository, along with other bugfixes, shortly.

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

2 participants