diff options
author | Per Bothner <per@bothner.com> | 2004-02-25 21:30:01 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2004-02-25 21:30:01 -0800 |
commit | 9980cc4b9999693f1c90f3bc3d3c1d15e7761ff4 (patch) | |
tree | 2a8fa5f5fbbde9d8a5a8bd24377fd97312f098ef /gcc/java/parse.y | |
parent | e15fd46ada9f56060f3fdb780035ff46e561f703 (diff) | |
download | gcc-9980cc4b9999693f1c90f3bc3d3c1d15e7761ff4.zip gcc-9980cc4b9999693f1c90f3bc3d3c1d15e7761ff4.tar.gz gcc-9980cc4b9999693f1c90f3bc3d3c1d15e7761ff4.tar.bz2 |
parse.y (build_assertion): If we're in an inner class, create the class$ helper routine in the outer class.
* parse.y (build_assertion): If we're in an inner class, create the
class$ helper routine in the outer class.
From-SVN: r78489
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r-- | gcc/java/parse.y | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 72cc9f3..8e419a5 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -15301,6 +15301,10 @@ build_assertion (int location, tree condition, tree value) { tree field, classdollar, id, call; tree class_type = TREE_TYPE (klass); + tree outer_class = klass; + while (INNER_CLASS_DECL_P (outer_class)) + outer_class = DECL_CONTEXT (outer_class); + outer_class = TREE_TYPE (outer_class); field = add_field (class_type, get_identifier ("$assertionsDisabled"), @@ -15309,9 +15313,10 @@ build_assertion (int location, tree condition, tree value) MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (field); FIELD_SYNTHETIC (field) = 1; - if (!TYPE_DOT_CLASS (class_type)) - build_dot_class_method (class_type); - classdollar = build_dot_class_method_invocation (class_type, class_type); + if (!TYPE_DOT_CLASS (outer_class)) + build_dot_class_method (outer_class); + classdollar + = build_dot_class_method_invocation (outer_class, class_type); /* Call CLASS.desiredAssertionStatus(). */ id = build_wfl_node (get_identifier ("desiredAssertionStatus")); |