summaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-28 06:18:31 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-28 06:18:31 +0000
commit90aa7002c7742d9ca54fd639065397fccac8db5a (patch)
tree4895ca2f0c9670895f39edea10adaac36fb4d2f2 /gcc/java/parse.y
parentfab7adbfb5b8861f87531f939ad03f891bba055a (diff)
downloadgcc-90aa7002c7742d9ca54fd639065397fccac8db5a.tar.gz
* parse.y (java_check_regular_methods): Check for construct after
checking types in throws clause. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61956 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 04c3cb564ea..48d48a91ab9 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -6260,17 +6260,8 @@ java_check_regular_methods (tree class_decl)
if (check_method_redefinition (class, method))
continue;
- /* If we see one constructor a mark so we don't generate the
- default one. Also skip other verifications: constructors
- can't be inherited hence hiden or overriden */
- if (DECL_CONSTRUCTOR_P (method))
- {
- saw_constructor = 1;
- continue;
- }
-
- /* We verify things thrown by the method. They must inherits from
- java.lang.Throwable */
+ /* We verify things thrown by the method. They must inherit from
+ java.lang.Throwable. */
for (mthrows = DECL_FUNCTION_THROWS (method);
mthrows; mthrows = TREE_CHAIN (mthrows))
{
@@ -6281,6 +6272,15 @@ java_check_regular_methods (tree class_decl)
(DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))));
}
+ /* If we see one constructor a mark so we don't generate the
+ default one. Also skip other verifications: constructors
+ can't be inherited hence hidden or overridden. */
+ if (DECL_CONSTRUCTOR_P (method))
+ {
+ saw_constructor = 1;
+ continue;
+ }
+
sig = build_java_argument_signature (TREE_TYPE (method));
found = lookup_argument_method2 (class, DECL_NAME (method), sig);