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:
Bryan Duxbury 2010-09-12 15:29:38 +00:00
parent 6e05e25c89
commit 76ecb91c3d

View File

@ -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);