From: David Reiss Date: Wed, 2 Sep 2009 22:15:55 +0000 (+0000) Subject: THRIFT-575. Allow required fields in function parameters X-Git-Tag: 0.2.0~35 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=45603e9c6c6196301655b2328007382f46ef627d;p=common%2Fthrift.git THRIFT-575. Allow required fields in function parameters r665255 was a bit too aggressive. "optional" was causing confusion, but there doesn't seem to be any harm in allowing "required". git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810713 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/compiler/cpp/src/thrifty.yy b/compiler/cpp/src/thrifty.yy index 8f6e167c..00e939c8 100644 --- a/compiler/cpp/src/thrifty.yy +++ b/compiler/cpp/src/thrifty.yy @@ -902,14 +902,7 @@ FieldIdentifier: FieldRequiredness: tok_required { - if (g_arglist) { - if (g_parse_mode == PROGRAM) { - pwarning(1, "required keyword is ignored in argument lists.\n"); - } - $$ = t_field::T_OPT_IN_REQ_OUT; - } else { - $$ = t_field::T_REQUIRED; - } + $$ = t_field::T_REQUIRED; } | tok_optional {