private static GuardedByExpression bind(JCTree.JCExpression exp, BinderContext context) {
    GuardedByExpression expr = BINDER.visit(exp, context);
    checkGuardedBy(expr != null, String.valueOf(exp));
    checkGuardedBy(expr.kind() != Kind.TYPE_LITERAL, "Raw type literal: %s", exp);
    return expr;
  }
@Test
  public void enclosingBlockScope() {
    assertThat(
            bind(
                "",
                "mu",
                forSourceLines(
                    "threadsafety/Test.java",
                    "package threadsafety;",
                    "import javax.annotation.concurrent.GuardedBy;",
                    "public class Test {",
                    "  public final Object mu = new Object();",
                    "  @GuardedBy(\"mu\") int x = 1;",
                    "  {",
                    "    new Object() {",
                    "      void f() {",
                    "        synchronized (mu) {",
                    "          x++;",
                    "        }",
                    "      }",
                    "    };",
                    "  }",
                    "}")))
        .isEqualTo("(SELECT (SELECT (THIS) outer$threadsafety.Test) mu)");
  }