mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
f14541626d
- Parse integer constants in Thrift files as 64-bit ints. - Die if an overflow occurs. - Warn if an enum value cannot fit in 32 bits. - Add a simple test for the above. I ran all of the generators over BrokenConstants.thrift before adding the overflow, and they appeared to work. However, the code generated was not always valid (for example, the 64-bit constant must have an LL suffix in C++). git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672907 13f79535-47bb-0310-9956-ffa450edef68
7 lines
126 B
Thrift
7 lines
126 B
Thrift
const i64 myint = 68719476736
|
|
const i64 broken = 9876543210987654321 // A little over 2^63
|
|
|
|
enum foo {
|
|
bar = 68719476736
|
|
}
|