capnproto
capnproto copied to clipboard
Windows binary produces confusing error when attempting to use generic parameter in List
test.capnp:
@0x91dfecf2a2e33a77;
struct Foo(T) {
data @0 :List(T);
}
struct Bar {
a @0 :UInt32;
}
struct Baz {
a @0 :Foo(Bar);
}
Using the Windows binary downloaded from https://capnproto.org/capnproto-c++-win32-1.0.2.zip:
> capnp --version
Cap'n Proto version 1.0.2
> capnp compile -ocapnp test.capnp
*** Uncaught exception ***
capnp/compiler/node-translator.c++:1374: context: member.name = data
capnp/schema.capnp.h:6800: failed: expected (which() == Type::AnyPointer::UNCONSTRAINED); Must check which() before get()ing a union member.
Using a Linux binary:
> capnp --version
Cap'n Proto version 1.0.2
> capnp compile -ocapnp test.capnp
test.capnp:4:14-21: error: 'List(AnyPointer)' is not supported.
This sounds like the same issue being addressed in #1807 (which I've been way too slow to review, sorry).