Bug 13512 - not implemented interface methods of abstract classes not found
Summary: not implemented interface methods of abstract classes not found
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 3.3.3
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
: 18787 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-12-30 11:40 UTC by Debian GCC Maintainers
Modified: 2005-07-23 22:49 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2003-12-30 11:41:00 UTC
[forwarded from http://bugs.debian.org/225438]

checked with 3.3 branch and 20031229 HEAD.

the compilation of 
 
G.java: 
import q.*; 
abstract class G extends F { 
    public String toString() { 
        return String.valueOf(bla()); 
    } 
} 
q/F.java: 
package q; 
import p.*; 
public abstract class F implements E { 
} 
 
p/E.java: 
package p; 
public interface E { 
    int bla(); 
} 
 
fails with the error message: 
 
G.java: In class `G': 
G.java: In method `G.toString()': 
G.java:4: error: No method named `bla' in scope. 
        return String.valueOf(bla()); 
                                 ^ 
1 error 
 
It works with jikes, though. As jikes is advertized to be very 
standard-compliant and as common sense says, this should work (because 
the class is abstract, it does not have to implement all methods, but in 
non-abstract subclasses they have to exist), this may be an error of 
gcj-3.3
Comment 1 Andrew Pinski 2003-12-30 18:34:51 UTC
This is fixed for 3.4 for sure (are you sure you had rechecked it right?).
No error messages:
[omni:~/src/gccPRs/pr12217] pinskia% vi p/E.java
[omni:~/src/gccPRs/pr12217] pinskia% vi q/F.java
[omni:~/src/gccPRs/pr12217] pinskia% vi G.java
[omni:~/src/gccPRs/pr12217] pinskia% ~/fsf-clean-nocheck/bin/gcj q/F.java -C
[omni:~/src/gccPRs/pr12217] pinskia% ~/fsf-clean-nocheck/bin/gcj p/E.java -C
[omni:~/src/gccPRs/pr12217] pinskia% ~/fsf-clean-nocheck/bin/gcj -C G.java
Comment 2 Andrew Pinski 2004-12-02 15:51:14 UTC
*** Bug 18787 has been marked as a duplicate of this bug. ***