Bug 90429 - Generic method overloading. Javac allows but eclipse doesn't
Summary: Generic method overloading. Javac allows but eclipse doesn't
Status: RESOLVED DUPLICATE of bug 90423
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.1 M7   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-06 07:30 EDT by Mohan Radhakrishnan CLA
Modified: 2005-04-06 07:34 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohan Radhakrishnan CLA 2005-04-06 07:30:37 EDT
public class Overloading {

	public static <S extends String> S foo() { 
	    System.out.println("String"); 
	    return null; 
	  }
	  
	public static <N extends Number> N foo() { 
	    System.out.println("Number");
	    return null; 
	}
	
	public static void main(String[] args) {
		Overloading.<String>foo();
		Overloading.<Number>foo();
		Overloading o = new Overloading();
	    o.<Number>foo();
		
	}

}

This class compiles and works when you use javac but eclipse3.1M5a shows an 
error "Duplicate method foo() in type Overloading"
Comment 1 Philipe Mulet CLA 2005-04-06 07:34:38 EDT

*** This bug has been marked as a duplicate of 90423 ***