#140 Can't use static fields of nested classes as parameters

open
nobody
None
5
2003-09-30
2003-09-30
Eric Jain
No

Given a class B nested within a class A:

public class A
{
private B b;

public static class B
{
public static final B THING = new B();
}

public void setB(B b)
{
this.b = b;
}
}

The following bsh code fails at line 2 with "Method setB
(A$B) not found in class A":

a = new A();
a.setB(A.B.THING);

Discussion