Bug 84181 - [1.5] ITypeBinding.isFromSource incorrect on raw bindings
Summary: [1.5] ITypeBinding.isFromSource incorrect on raw bindings
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-01 15:48 EST by Adam Kiezun CLA
Modified: 2005-02-16 12:48 EST (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-01 15:48:42 EST
3.1M4
package p;

import java.util.Vector;

public class NestedVectors0 {
  void k() {
    Vector v2 = new Vector();
    Vector v3 = new Vector();

    v3.add("fff");
    v2.add(v3);
   }
}

Consider the ClassInstanceCreation nodes for Vector. (AST is JLS3 level)
When you ask the binding (which is a RawTypeBinding)
isFromSource() it returns true which is incorrect.
Comment 1 Adam Kiezun CLA 2005-02-01 16:12:17 EST
the workaround that I used is:

 //XXX workaround for 84181
 boolean isFromSource= tb.isRawType() ? tb.getErasure().isFromSource() :
                                        tb.isFromSource();

Comment 2 Olivier Thomann CLA 2005-02-01 16:30:37 EST
Fixed and released in HEAD.
Regression test added in ASTConverter15Test.test0133.
Comment 3 Adam Kiezun CLA 2005-02-01 16:31:58 EST
a quickie, I see.
thx Olivier
Comment 4 Olivier Thomann CLA 2005-02-01 16:46:32 EST
I released a new version. I also missed the case for a parameterized type.
Regression test added in ASTConverter15Test.test0134.
Comment 5 David Audel CLA 2005-02-16 12:48:59 EST
Verified in I20050215-2300