Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Warning for 'false' equals true #60

wants to merge 1 commit into


None yet
3 participants

erikvanoosten commented Mar 25, 2013

Warn that 'false' is interpreted as true when it is used as a boolean literal. See also #13.

@sprsquish sprsquish commented on the diff Jun 12, 2013

@@ -185,6 +185,10 @@ class ThriftParser(importer: Importer, strict: Boolean) extends RegexParsers {
val transformedVal = ftype match {
case TBool => value map {
case IntLiteral(0) => BoolLiteral(false)
+ case IdRHS(SimpleID("false")) => {
+ System.err.println("WARNING: according to Apache Thrift 'false' will translate to a true value, use '0' if you really meant false")

sprsquish Jun 12, 2013


This should use failOrWarn


nshkrob commented Jul 22, 2015

Boolean constants handling was fixed in e9d2508.

@nshkrob nshkrob closed this Jul 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment