parse.y (java_check_regular_methods): Check for construct after checking types in...
authorTom Tromey <tromey@redhat.com>
Tue, 28 Jan 2003 06:18:31 +0000 (06:18 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 28 Jan 2003 06:18:31 +0000 (06:18 +0000)
* parse.y (java_check_regular_methods): Check for construct after
checking types in throws clause.

From-SVN: r61956

gcc/java/ChangeLog
gcc/java/parse.y

index 5c2199eb3c502f8945e559bc35ed09f3ce3e747f..ed7106b39da043daf37e66c2cd285cad2a7aba25 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-27  Tom Tromey  <tromey@redhat.com>
+
+       * parse.y (java_check_regular_methods): Check for construct after
+       checking types in throws clause.
+
 2003-01-24  Tom Tromey  <tromey@redhat.com>
 
        * class.c (build_static_field_ref): Only a String or numeric field
index 04c3cb564ea2cb6ece77cfa1b35cd5eb333656be..48d48a91ab952cf728c4a11801ed875a24f8ecef 100644 (file)
@@ -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);