Bug 23055 - DOM - SuperMethodInvocation.resolveTypeBinding() returns null
Summary: DOM - SuperMethodInvocation.resolveTypeBinding() returns null
Status: RESOLVED DUPLICATE of bug 22054
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-30 16:57 EDT by mark_dixon CLA
Modified: 2002-09-03 16:29 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 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 ***