Bug 74544 - [1.5] Invalid compiler binding for parameterized qualified type reference
Summary: [1.5] Invalid compiler binding for parameterized qualified type reference
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-22 10:15 EDT by Frederic Fusier CLA
Modified: 2004-09-24 06:41 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 Frederic Fusier CLA 2004-09-22 10:15:05 EDT
Using build I200409212000.

With following test case:
X.java
  public class X<T> {
    class Member {}
  }
Y.java
  public class Y {
    X<String>.Member m;
  }

The binding for ParameterizedQualifiedTypeReference "X<String>.Member" is a
ParameterizedTypeBinding "X<String>" instead of an expected MemberTypeBinding...
Comment 1 Frederic Fusier CLA 2004-09-22 11:07:53 EDT
Problem comes from ParameterizedQualifiedTypeReference.internalResolve(Scope).
Fix is easy and passes all tests.
Perhaps may be put in M2?
Comment 2 Philipe Mulet CLA 2004-09-22 11:38:13 EDT
Indeed, binding is incomplete. Following code demonstrate it:

  public class X<T> {
    class Member {
    	void foo(){
    		System.out.println("SUCCESS");
    	}
    }
  }
  class Y {
  	public static void main(String[] args) {
	    X<String>.Member m = new X<String>.Member();
	    m.foo();
  	}    
  }

it shouldn't complain about #foo() method being undefined on X<String>
Comment 3 Philipe Mulet CLA 2004-09-22 11:39:41 EDT
Fixed ParameterizedQualifiedTypeReference. Real binding should be still a 
parameterized one, but constructed from the member type.

Added regression test: GenericTypeTest#test303.
Comment 4 Frederic Fusier CLA 2004-09-24 06:41:21 EDT
Verified for 3.1 M2 with build I200409231635.