mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-08 03:08:53 +00:00
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
This commit is contained in:
parent
3647fc62f5
commit
45603e9c6c
@ -902,14 +902,7 @@ FieldIdentifier:
|
|||||||
FieldRequiredness:
|
FieldRequiredness:
|
||||||
tok_required
|
tok_required
|
||||||
{
|
{
|
||||||
if (g_arglist) {
|
$$ = t_field::T_REQUIRED;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
| tok_optional
|
| tok_optional
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user