From a4155d7746ebe824ef5d90cbea2682f9f17b47ce Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Sat, 21 Jun 2014 09:32:52 -0400 Subject: [PATCH] set discriminant --- compiler/src/main/cpp/capnpc-java.c++ | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/src/main/cpp/capnpc-java.c++ b/compiler/src/main/cpp/capnpc-java.c++ index 698e000..e158d6c 100644 --- a/compiler/src/main/cpp/capnpc-java.c++ +++ b/compiler/src/main/cpp/capnpc-java.c++ @@ -937,6 +937,7 @@ private: spaces(indent), " throw new Error();\n", spaces(indent), " }\n", spaces(indent), " public final ", type, ".Builder init", titleCase, "() {\n", + unionDiscrim.set, spaces(indent), " return ", type, ".factory.fromStructBuilder(_builder.getPointerField(", offset, ").initStruct(", type, ".STRUCT_SIZE", "));\n",