Properly handle constants of typedef'ed types.

Also throw an error in the compiler if we cannot generate a constant for a
declared const because of its type.  Added a test of this functionality in
ConstantsDemo.thrift.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665675 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/ConstantsDemo.thrift b/test/ConstantsDemo.thrift
index 0b9d839..dc12bb0 100644
--- a/test/ConstantsDemo.thrift
+++ b/test/ConstantsDemo.thrift
@@ -14,6 +14,9 @@
   1: constants val = TWO
 }
 
+typedef i32 myIntType
+const myIntType myInt = 3
+
 const map<constants,string> GEN_ENUM_NAMES = {ONE : "HOWDY", TWO: PARTNER}
 
 const i32 hex_const = 0x0001F