void () { doTest( """ class X implements AutoCloseable { @Override public void close() {} private static void example() { X x = createX(); if (x != null) { new EscapeTo(10, x); } } native static X createX(); } class EscapeTo { X x; EscapeTo(int y, X x) {this.x = x;} native void doStuff(); }"""); }