[Bug java/20312] No warning on bad method

daney at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jan 30 01:53:00 GMT 2007



------- Comment #7 from daney at gcc dot gnu dot org  2007-01-30 01:53 -------
In 4.3.0 this is correctly flagged as an error.  With the testcase in comment
#1 we get:

$ gcj -o t --main=t t.java
t.java:3: error: Exception IOException is not compatible with throws clause in
Object.toString()
        public String toString()  throws java.io.IOException
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 problem (1 error)


-- 

daney at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
      Known to work|                            |4.3.0
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20312



More information about the Java-prs mailing list