From 6518c7b51fe5df930c40168f785382335d55652b Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Thu, 1 Jun 2000 20:43:37 +0000 Subject: re GNATS gcj/127 (gcj dumps core on method invocation on a primitive type) 2000-05-23 Bryce McKinlay * parse.y (patch_method_invocation): Don't try to lookup methods in primitive types. (This fixes the PR gcj/127: http://sourceware.cygnus.com/ml/java-prs/2000-q1/msg00011.html) From-SVN: r34347 --- gcc/java/parse.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gcc/java/parse.c') diff --git a/gcc/java/parse.c b/gcc/java/parse.c index c787183..fd547f2 100644 --- a/gcc/java/parse.c +++ b/gcc/java/parse.c @@ -12090,6 +12090,16 @@ patch_method_invocation (patch, primary, where, is_static, ret_decl) type = GET_SKIP_TYPE (resolved); resolve_and_layout (type, NULL_TREE); + + if (JPRIMITIVE_TYPE_P (type)) + { + parse_error_context + (identifier_wfl, + "Can't invoke a method on primitive type `%s'", + IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); + PATCH_METHOD_RETURN_ERROR (); + } + list = lookup_method_invoke (0, identifier_wfl, type, identifier, args); args = nreverse (args); -- cgit v1.1