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

List of List transpilation error #81

Open
LasseBlaauwbroek opened this issue Oct 22, 2021 · 0 comments
Open

List of List transpilation error #81

LasseBlaauwbroek opened this issue Oct 22, 2021 · 0 comments

Comments

@LasseBlaauwbroek
Copy link

Compiling

@0xafda4797418def92;
const listlist :List(List(UInt8)) = [[3]];

Leads to generated code with a syntax error (partially replicated here):

  module Reader = struct
    type array_t = ro MessageWrapper.ListStorage.t
    type builder_array_t = rw MessageWrapper.ListStorage.t
    type pointer_t = ro MessageWrapper.Slice.t option
    let of_pointer = RA_.deref_opt_struct_pointer

    let listlist : (ro, (ro, int, array_t) Capnp.Array.t, array_t) Capnp.Array.t =
      let decoders = RA_.ListDecoders.Pointer (fun slice ->
        let decoders = RA_.ListDecoders.Pointer (fun slice ->
          let struct_storage = RA_.pointers_struct slice in
          RA_.get_uint8_list (Some struct_storage) 0)
        in
        decoders)
      RA_.make_array_readonly _reader_default_value_12545965927582454309_listlist decoders
  end

Error:

86 |       RA_.make_array_readonly _reader_default_value_12545965927582454309_listlist decoders
           ^^^

It appears that a in is missing.

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