Bug 90429

Summary: Generic method overloading. Javac allows but eclipse doesn't
Product: [Eclipse Project] JDT Reporter: Mohan Radhakrishnan <javatech>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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 ***