Thrift: More constant enums.
Summary:
Make enum constants as structure defaults work.
Make enum constants as constant map keys work.
Un-break the generated skeleton servers.
Reviewed By: mcslee
Test Plan:
cd test
../compiler/cpp/thrift -cpp ConstantsDemo.thrift
g++ -I../lib/cpp/src -c gen-cpp/*.cpp
Also compared the generated output to the old generated output.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665193 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/ConstantsDemo.thrift b/test/ConstantsDemo.thrift
index 3af9f93..8cc6a1f 100644
--- a/test/ConstantsDemo.thrift
+++ b/test/ConstantsDemo.thrift
@@ -10,7 +10,11 @@
TWO = 2
}
-const map<i32,string> GEN_ENUM_NAMES = {ONE : "HOWDY", TWO: PARTNER}
+struct thing2 {
+ 1: constants val = TWO
+}
+
+const map<constants,string> GEN_ENUM_NAMES = {ONE : "HOWDY", TWO: PARTNER}
const i32 hex_const = 0x0001F