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

Default values treated differently than native runtime #37

Open
jchavarri opened this issue Jun 23, 2022 · 0 comments
Open

Default values treated differently than native runtime #37

jchavarri opened this issue Jun 23, 2022 · 0 comments

Comments

@jchavarri
Copy link
Member

Given some atd file in a module Answer:

type value = [
  | True
  | False
] <ocaml repr="classic">

type t = {
  ~mode <ocaml default="False"> : value;
}

when calling from native:

utop # Answer_j.string_of_t {mode = False};;
- : string = "{}"

but from JavaScript:

$ Answer_bs.write_t({mode: False})->Js.Json.stringify
{"mode":"False"}

The expected result should be same as native:

$ Answer_bs.write_t({mode: False})->Js.Json.stringify
{}
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