THRIFT-2503 C++: Fix name collision when a struct has a member named "val"
Client: C++
Patch: Jens Geyer & Alexander Potashev
diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc b/compiler/cpp/src/generate/t_cpp_generator.cc
index c171a53..825937b 100755
--- a/compiler/cpp/src/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/generate/t_cpp_generator.cc
@@ -1175,7 +1175,7 @@
 	out << " val) {" << endl;
       }
       indent_up();
-      out << indent() << (*m_iter)->get_name() << " = val;" << endl;
+      out << indent() << "this->" << (*m_iter)->get_name() << " = val;" << endl;
       indent_down();
 
       // assume all fields are required except optional fields.