This works on my end:

    @0xdebdf27f66c354b6;

    struct Foo(A) {
      field @0 :A;
    }

    struct B {}

    struct C {
      field @0 :List(Foo(B));
    }

Including the exact error message would make it easier to help.

-Ian

Quoting nikos efthias (2020-05-04 19:17:51)
>    I need a List(foo(b)) that is the problem capnp compile command
>    generates an error saying this is impossible
>
>    On Mon, May 4, 2020 at 7:12 pm, Ian Denhardt <[email protected]> wrote:
>
>    "Pointers" aren't an explicit thing in the schema language. Data, Text,
>    structs, lists and interfaces are implicitly pointers, while primitive
>    types like Bool and Float64 are not. Type parameters must always be
>    pointer types. So in this case you can just do: struct Foo(A) { field
>    @0 :A; } struct B{}; struct C { field :List(B); } -Ian Quoting nikos
>    efthias (2020-05-04 18:01:44)
>
>      I have a Struct containing generics which accepts another struct
>      such as ``` struct foo (a){ � � � field @0 :a } struct b{}
>      struct c{ field:List(a(b) } ``` the example above wont work because
>      I need to pass a b pointer to a but There is no documentation for
>      defining pointers I tried *b and &b which does not work. How do I
>      define the pointer? -- You received this message because you are
>      subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe
>      from this group and stop receiving emails from it, send an email to
>      [1][1][email protected]. To view this
>      discussion on the web visit
>      [2][2]https://groups.google.com/d/msgid/capnproto/bd400995-9d98-4caf
>      -8e10- 81a3fe1de564%40googlegroups.com. Verweise 1.
>      [3]mailto:[email protected] 2.
>      [4]https://groups.google.com/d/msgid/capnproto/bd400995-9d98-4caf-8e
>      10-81a3fe1de564%40googlegroups.com?utm_medium=email&utm_source=foote
>      r
>
>    --
>    You received this message because you are subscribed to the Google
>    Groups "Cap'n Proto" group.
>    To unsubscribe from this group and stop receiving emails from it, send
>    an email to [5][email protected].
>    To view this discussion on the web visit
>    [6]https://groups.google.com/d/msgid/capnproto/R1YT9Q.RHGO2QSOY5ZV1%40g
>    mail.com.
>
> Verweise
>
>    1. mailto:[email protected]
>    2. https://groups.google.com/d/msgid/capnproto/bd400995-9d98-4caf-8e10
>    3. mailto:[email protected]
>    4. 
> https://groups.google.com/d/msgid/capnproto/bd400995-9d98-4caf-8e10-81a3fe1de564%40googlegroups.com?utm_medium=email&utm_source=footer
>    5. mailto:[email protected]
>    6. 
> https://groups.google.com/d/msgid/capnproto/R1YT9Q.RHGO2QSOY5ZV1%40gmail.com?utm_medium=email&utm_source=footer

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/158864254232.13383.10024991609677717318%40localhost.localdomain.

Reply via email to