capnproto / capnpc-rust

Cap'n Proto code generation for Rust
75 stars 26 forks source link

generics in superclass can cause compilation failure #31

Closed dwrensha closed 7 years ago

dwrensha commented 7 years ago

The following schema produces Rust code that fails to typecheck:

@0xcb429469dd078275;
interface GenericBase(T) {}
interface GenericExtend extends(GenericBase(Data)) {}

The error given by rustc is:

 |   pub trait Server<> : ::test_capnp::generic_base::Server {
 |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 type argument, found 0