Commit c1f042f8 by Tom Tromey Committed by Tom Tromey

re PR java/17500 (Anonymous inner class compile freakout)

	PR java/17500:
	* parse.y (create_artificial_method): Use add_method_1.

From-SVN: r88108
parent 4b2582f0
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> 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
* expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
......
...@@ -7468,7 +7468,11 @@ create_artificial_method (tree class, int flags, tree type, ...@@ -7468,7 +7468,11 @@ create_artificial_method (tree class, int flags, tree type,
mdecl = make_node (FUNCTION_TYPE); mdecl = make_node (FUNCTION_TYPE);
TREE_TYPE (mdecl) = type; TREE_TYPE (mdecl) = type;
TYPE_ARG_TYPES (mdecl) = args; 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 (); java_parser_context_restore_global ();
DECL_ARTIFICIAL (mdecl) = 1; DECL_ARTIFICIAL (mdecl) = 1;
return mdecl; return mdecl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment