[thrift] erlang structs now compile
Summary: if "cond and cond ->" is not valid erlang,
if "cond andalso cond ->" is.
Reviewed By: cpiro
Test Plan: generated erlang from and thrift file with structs ...
generated code compiles
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665314 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_erl_generator.cc b/compiler/cpp/src/generate/t_erl_generator.cc
index c070b76..3e3f966 100644
--- a/compiler/cpp/src/generate/t_erl_generator.cc
+++ b/compiler/cpp/src/generate/t_erl_generator.cc
@@ -417,7 +417,7 @@
// Generate deserialization code for known cases
for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
- out << indent() << "(Fid == " << (*f_iter)->get_key() << ") and (Ftype == "
+ out << indent() << "(Fid == " << (*f_iter)->get_key() << ") andalso (Ftype == "
<< type_to_enum((*f_iter)->get_type()) << ") ->" << endl;
indent_up();