Thrift-1409: Name conflict check does not work properly for exception object(Delphi).
authorJake Farrell <jfarrell@apache.org>
Tue, 1 Nov 2011 01:08:46 +0000 (01:08 +0000)
committerJake Farrell <jfarrell@apache.org>
Tue, 1 Nov 2011 01:08:46 +0000 (01:08 +0000)
Client: delphi
Patch: Kenjiro Fukumitsu

Delphi compiler's naming check does not work properly with exception object in the function that generates struct writer.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1195747 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_delphi_generator.cc

index 0215e3c..148d284 100644 (file)
@@ -2548,7 +2548,7 @@ void t_delphi_generator::generate_delphi_struct_writer_impl(ostream& out, string
     bool null_allowed = type_can_be_null((*f_iter)->get_type());
     if (null_allowed) {
       indent_impl(code_block) <<
-        "if ((" << prop_name((*f_iter)) << " <> nil) and __isset_" << prop_name(*f_iter,is_exception) << ") then" << endl;
+        "if ((" << prop_name((*f_iter), is_exception) << " <> nil) and __isset_" << prop_name(*f_iter,is_exception) << ") then" << endl;
       indent_impl(code_block) << "begin" << endl;
       indent_up_impl();
     } else {