Menu

#21 DefiningTypeDeclaration in Get.impl is not correct

open
nobody
analyzer (15)
5
2005-01-16
2005-01-16
nb_
No

The function DefiningTypeDeclaration in the unit Get.impl
is not complete.
The function misses the usage anonymous inner classes and
skips them:

class A {
public void g() {
new B() {
public void f() { }
}
}
}

Using the function DefiningTypeDeclaration on method f()
will result
in class A, which is not correct, should stop at the
ClassInstanceCreation
node.

There are a couple of rules which use this function, we
should supply an
extra test case which especially tests for inner classes.

Discussion


Log in to post a comment.