2000-05-25 Tom Tromey <tromey@cygnus.com>
+ * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
+ when trying to see if field's class should be initialized. Always
+ initialize field's declaring class, not qualified class.
+ For PR gcj/162.
+
* parse.y (array_constructor_check_entry): Pass `wfl_value', not
`wfl_operator', to maybe_build_primttype_type_ref.
Fixes PR gcj/235.
is_static = JDECL_P (decl) && FIELD_STATIC (decl);
if (FIELD_FINAL (decl)
&& JPRIMITIVE_TYPE_P (TREE_TYPE (decl))
- && DECL_LANG_SPECIFIC (decl)
&& DECL_INITIAL (decl))
{
field_ref = DECL_INITIAL (decl);
return error_mark_node;
if (is_static && !static_final_found
&& !flag_emit_class_files && !flag_emit_xref)
- field_ref = build_class_init (type_found, field_ref);
+ field_ref = build_class_init (DECL_CONTEXT (decl), field_ref);
}
else
field_ref = decl;
is_static = JDECL_P (decl) && FIELD_STATIC (decl);
if (FIELD_FINAL (decl)
&& JPRIMITIVE_TYPE_P (TREE_TYPE (decl))
- && DECL_LANG_SPECIFIC (decl)
&& DECL_INITIAL (decl))
{
field_ref = DECL_INITIAL (decl);
return error_mark_node;
if (is_static && !static_final_found
&& !flag_emit_class_files && !flag_emit_xref)
- field_ref = build_class_init (type_found, field_ref);
+ field_ref = build_class_init (DECL_CONTEXT (decl), field_ref);
}
else
field_ref = decl;