aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>2002-03-27 08:27:27 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2002-03-27 08:27:27 +0000
commit058330951de0cd5db55aa5ece905689faf0de920 (patch)
tree8ae6cfc4e900d10e7d90077f2bd75059564303ee /gcc/java/expr.c
parent473aef78b4cd09a11ff492d1a3ae6945bbdaf1bd (diff)
downloadgcc-058330951de0cd5db55aa5ece905689faf0de920.zip
gcc-058330951de0cd5db55aa5ece905689faf0de920.tar.gz
gcc-058330951de0cd5db55aa5ece905689faf0de920.tar.bz2
re PR java/5850 (resolving inherited member variables with same name works poorly)
Fix for PR java/5850: * parse.y (lookup_field_wrapper): Call itself recursively for enclosing context if field was not found in the current scope. * expr.c (lookup_field): Don't look in enclosing contexts. From-SVN: r51438
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 2a8e2e3..a1ec332 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1517,16 +1517,6 @@ lookup_field (typep, name)
if (DECL_NAME (field) == name)
return field;
- /* If *typep is an innerclass, lookup the field in its enclosing
- contexts */
- if (INNER_CLASS_TYPE_P (*typep))
- {
- tree outer_type = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (*typep)));
-
- if ((field = lookup_field (&outer_type, name)))
- return field;
- }
-
/* Process implemented interfaces. */
basetype_vec = TYPE_BINFO_BASETYPES (*typep);
n = TREE_VEC_LENGTH (basetype_vec);