<p>(Java question)</p>

<p>If I reference a field in an inner class, does this cause a circular dependency between the enclosing class and the inner class?</p>

<p>How can I avoid this? </p>

<p>Here is an example:</p>

<pre><code>public class Outer {

  private Other o;
  private Inner i;    

  public Outer() {
    o = new Other();

    i = new Inner() {
      public void doSomething() {
        o.foo();
      }
    };

  }
}
</code></pre>

The syntax you're using in the example is a little off there is no declaration of the class or interface Inner. But there isn't anything wrong with the concept of the example. In Java it will work fine.
I'm not sure what you're doing here, but you may want to consider a more simple design for maintainability etc.
It's a common pattern for anonymous event handlers to reference elements of their parent class, so no reason to avoid it if that's the case, that's how Java was designed instead of having function pointers.