mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 18:58:51 +00:00
THRIFT-897. compiler: Don't allow unqualified enum constant access
Fix some confusion in the java generator about adding the class name. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996327 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6e05e25c89
commit
76ecb91c3d
@ -631,7 +631,7 @@ string t_java_generator::render_const_value(ofstream& out, string name, t_type*
|
||||
throw "compiler error: no const of base type " + t_base_type::t_base_name(tbase);
|
||||
}
|
||||
} else if (type->is_enum()) {
|
||||
render << type_name(type, false, false) << "." << value->get_identifier();
|
||||
render << value->get_identifier();
|
||||
} else {
|
||||
string t = tmp("tmp");
|
||||
print_const_value(out, t, type, value, true);
|
||||
|
Loading…
Reference in New Issue
Block a user