Bug 23055

Summary: DOM - SuperMethodInvocation.resolveTypeBinding() returns null
Product: [Eclipse Project] JDT Reporter: mark_dixon
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description mark_dixon CLA 2002-08-30 16:57:15 EDT
Running I200208270833

This code
IWorkspace ws = testcasesPlugin.getWorkspace();
IWorkspaceRoot root = ws.getRoot();
IProject project = root.getProjects()[0];
IJavaProject jp = JavaCore.create(project);

CompilationUnit cu = AST.parseCompilationUnit(
   "public class Class {public Object clone() {try {return super.clone();}
	catch (CloneNotSupportedException e) {	return null;}}}".toCharArray(),
   "Class", jp);
cu.accept(new ASTVisitor() {
   public boolean visit(SuperMethodInvocation node) {
      IBinding binding = node.resolveTypeBinding();
      if (null == binding) {
         System.out.println("Null type binding for SuperMethodInvocation " + 
node.getName().getIdentifier());
      }
      return true;
   }
});

produces
Null type binding for SuperMethodInvocation clone

The problem is DefaultBindingResolver.resolveExpressionType, which resolves 
every expression type except for SuperMethodInvocation :-)

Thanks
Mark
Comment 1 Olivier Thomann CLA 2002-09-03 16:29:20 EDT

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