Bug 12445 - Compiler Failure on reference to abstract interface method
Summary: Compiler Failure on reference to abstract interface method
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-28 11:11 EST by Philipe Mulet CLA
Modified: 2002-03-28 18:43 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2002-03-28 11:11:57 EST
From EC:
------------------------
In the latest stable build (20020321), I started getting compile errors
and there have not been any changes to my code.

I have two classes that look like this:

public interface FooInterface
{
    public boolean foo(int a);
    public boolean bar(int a);
}

abstract public class FooClass implements FooInterface
{
    public boolean foo(int a, int b)
    {
        return true;
    }

    public int test(int a)
    {
        boolean result = foo(a);  //  <-- THIS LINE FAILS TO COMPILE
        if(result) return 1; else return 0;
    }
}


Problem:

There is a compiler error that says:
"The method foo(int, int) in the type FooClass is not applicable for the
arguments (int)"
However, this IS legal since FooClass is abstract and it inherits this
method from FooInterface


Is this already a known issue?
Both the Sun JDK and the previous stable build of eclipse handled this
correctly.


- Mike G.
Comment 1 Philipe Mulet CLA 2002-03-28 18:31:38 EST
This only occurs in 1.4 mode due to some name lookup refinement which are in 
trouble due to the lack of default abstract methods in 1.4 mode.

Comment 2 Philipe Mulet CLA 2002-03-28 18:43:42 EST
Thanks for the fix Kent.
Fixed