/* * @test /nodynamiccopyright/ * @bug 6911256 6964740 6965277 * @author Maurizio Cimadamore * @summary Resource of a type-variable type crashes Flow * @compile ResourceTypeVar.java */ class ResourceTypeVar { public void test() { try(X armflow = getX()) { //do something } catch (Exception e) { // Not reachable throw new AssertionError("Shouldn't reach here", e); } } X getX() { return null; } }