+2004-09-25 Tom Tromey <tromey@redhat.com>
+
+ PR java/17500:
+ * parse.y (create_artificial_method): Use add_method_1.
+
2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
* expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
mdecl = make_node (FUNCTION_TYPE);
TREE_TYPE (mdecl) = type;
TYPE_ARG_TYPES (mdecl) = args;
- mdecl = add_method (class, flags, name, build_java_signature (mdecl));
+ /* We used to compute the signature of MDECL here and then use
+ add_method(), but that failed because our caller might modify
+ the type of the returned method, which trashes the cache in
+ get_type_from_signature(). */
+ mdecl = add_method_1 (class, flags, name, mdecl);
java_parser_context_restore_global ();
DECL_ARTIFICIAL (mdecl) = 1;
return mdecl;