Bug 93102 - [1.5] Cannot restore capture binding from binding key
Summary: [1.5] Cannot restore capture binding from binding key
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-28 07:07 EDT by Markus Keller CLA
Modified: 2005-05-12 09:48 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 Markus Keller CLA 2005-04-28 07:07:36 EDT
I20050426-1700

Cannot restore capture binding from binding key using
ASTRequestor()#acceptBinding(...):

package xy;
import java.util.Vector;
public class Cap {
	{
		Vector<?> v= null;
		v.get(0);
	}
}

- The capture binding for "v.get(0)" has key "Lxy/Cap;!*634;".
-> The resolved binding is for class xy.Cap (key "Lxy/Cap;").

- The capture binding for the reference to "v" has key
"Ljava/util/Vector<Lxy/Cap;!*634;>;"
-> The resolved binding is for parameterized type Vector<Cap> (key
"Ljava/util/Vector<Lxy/Cap;>;").

Same problem for wildcards with upper/lower bounds.
Comment 1 Jerome Lanneluc CLA 2005-04-29 07:17:17 EDT
Changed wildcard key to include the generic type of the wildcard (that can be
different from the capture's source type).
Adpated BindingKeyParser and its subclasses.
Added regression test BatchASTCreationTests#test060() and adapted other tests.
Comment 2 Frederic Fusier CLA 2005-05-12 09:48:24 EDT
Verified for 3.1 M7 using build I20050509-2010 + jdt.core HEAD.