Bug 86644 - infer type args: incorrect with method type params used as type args
Summary: infer type args: incorrect with method type params used as type args
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 87050
Blocks:
  Show dependency tree
 
Reported: 2005-02-25 11:04 EST by Adam Kiezun CLA
Modified: 2005-05-08 09:09 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 Adam Kiezun CLA 2005-02-25 11:04:54 EST
3.1M5a
public class Cell{
  public <T> T f1(T l){
	  Vector v= new Vector();
	  v.add(l);
	  return (T)v.get(0);
  }
}

it infers:
public class Cell{
  public <T> T f1(T l){
	  Vector<Cell> v= new Vector<Cell>();
	  v.add(l);
	  return v.get(0);
  }
}

(fyi: i'm working on 'our' side of this problem)
Comment 1 Adam Kiezun CLA 2005-02-25 15:59:22 EST
sorry - reassignment happened by mistake
Comment 2 Markus Keller CLA 2005-03-03 03:17:56 EST
This is due to bug 87050. The refactoring correctly calculates <T> as type
argument for Vector, but JDT/Core doesn't correctly resolve the binding from the
key.
Comment 3 Markus Keller CLA 2005-05-08 09:09:51 EDT
Was indeed bug 87050. Fixed in HEAD.