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

atdgen makes invalid JSON code if there is an inline record #417

Open
irategopher opened this issue Dec 13, 2024 · 0 comments
Open

atdgen makes invalid JSON code if there is an inline record #417

irategopher opened this issue Dec 13, 2024 · 0 comments

Comments

@irategopher
Copy link

I've found an issue when atdgen accepts an inline record definition but generates an invalid code:

File "hello_j.ml", line 221, characters 19-24:
221 |               ob x.field;
                         ^^^^^

hello.atd:
type arithmetic = [ Composite of {field: int} ] <ocaml repr="classic">

Steps to reproduce:

echo 'type arithmetic = [ Composite of {field: int} ] <ocaml repr="classic">' > hello.atd && \
atdgen -t hello.atd && \
atdgen -j hello.atd && \
ocamlfind ocamlc -c hello_t.mli -package atdgen && \
ocamlfind ocamlc -c hello_j.mli -package atdgen && \
ocamlfind ocamlopt -c hello_j.ml -package atdgen
smondet added a commit that referenced this issue Jan 3, 2025
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