}
}
public void testViolator() {
{
MockJavaResource buggy = JavaResourceBase.createMockJavaResource("Buggy",
"class Buggy {",
" native void jsniMeth() /*-{",
" $wnd.alert(@Extra.Inner::x);",
" }-*/;",
"}");
MockJavaResource extra = JavaResourceBase.createMockJavaResource("Extra",
"class Extra {",
" private static class Inner { ",
" private static int x = 3;",
" }",
"}");
shouldGenerateNoError(buggy, extra);
}
{
MockJavaResource buggy = JavaResourceBase.createMockJavaResource("Buggy",
"class Buggy {",
" native void jsniMeth() /*-{",
" $wnd.alert(@Extra.Inner::x);",
" }-*/;",
"}");
MockJavaResource extra = JavaResourceBase.createMockJavaResource("Extra",
"class Extra {",
" private static class Inner { ",
" private static long x = 3;",
" }",
"}");