Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/mp/proxy-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,8 @@ void BuildOne(TypeList<LocalType> param,
template <size_t index, typename LocalType, typename Value, typename Output>
void BuildOne(TypeList<LocalType> param,
InvokeContext& invoke_context,
Output& output,
Value& value,
Output&& output,
Value&& value,
typename std::enable_if<index == ProxyType<LocalType>::fields>::type* enable = nullptr)
{
}
Expand Down
4 changes: 4 additions & 0 deletions test/mp/test/foo.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface FooInterface $Proxy.wrap("mp::test::FooImplementation") {
callbackSaved @9 (context :Proxy.Context, arg: Int32) -> (result :Int32);
callbackExtended @10 (context :Proxy.Context, callback :ExtendedCallback, arg: Int32) -> (result :Int32);
passCustom @11 (arg :FooCustom) -> (result :FooCustom);
passEmpty @12 (arg :FooEmpty) -> (result :FooEmpty);
}

interface FooCallback $Proxy.wrap("mp::test::FooCallback") {
Expand All @@ -46,6 +47,9 @@ struct FooCustom $Proxy.wrap("mp::test::FooCustom") {
v2 @1 :Int32;
}

struct FooEmpty $Proxy.wrap("mp::test::FooEmpty") {
}

struct Pair(T1, T2) {
first @0 :T1;
second @1 :T2;
Expand Down
5 changes: 5 additions & 0 deletions test/mp/test/foo.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ struct FooCustom
int v2;
};

struct FooEmpty
{
};

class FooCallback
{
public:
Expand Down Expand Up @@ -55,6 +59,7 @@ class FooImplementation
int callbackSaved(int arg) { return m_callback->call(arg); }
int callbackExtended(ExtendedCallback& callback, int arg) { return callback.callExtended(arg); }
FooCustom passCustom(FooCustom foo) { return foo; }
FooEmpty passEmpty(FooEmpty foo) { return foo; }
std::shared_ptr<FooCallback> m_callback;
};

Expand Down
2 changes: 2 additions & 0 deletions test/mp/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ KJ_TEST("Call FooInterface methods")
KJ_EXPECT(custom_in.v1 == custom_out.v1);
KJ_EXPECT(custom_in.v2 == custom_out.v2);

foo->passEmpty(FooEmpty{});

disconnect_client();
thread.join();

Expand Down