Bug 44469 - Strange result when calling getDeclaringType() on local type
Summary: Strange result when calling getDeclaringType() on local type
Status: RESOLVED INVALID
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.0 M4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-08 12:09 EDT by Dirk Baeumer CLA
Modified: 2003-10-09 09:49 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 Dirk Baeumer CLA 2003-10-08 12:09:57 EDT
I20031007

In the following example

public class A {
	public void foo() {
		A a= new A() {};
	}
}

calling getDeclaring type on A(){...} returns an IType of format

class A [in [Working copy] A.java [in <default> [in src [in Test]]]]
  void foo()
    class <anonymous #1>
Comment 1 Jerome Lanneluc CLA 2003-10-08 17:26:25 EDT
What do you find strange about this type?
Comment 2 Dirk Baeumer CLA 2003-10-09 08:32:49 EDT
I got tricked by the line class <anonymous #1> and thought that the enclosing 
type was the type itself.

Closing as invalid.