// Test case for Issue 1415. // https://github.com/typetools/checker-framework/issues/1415 @SuppressWarnings("") // Check for crashes. class Issue1415 { static class Optional { static Optional absent() { return null; } static Optional of(T p) { return null; } } static class Box { void box(T p) {} } static class Crash9 { > void foo(boolean b, Box> box, Class enumClass) { box.box(b ? Optional.absent() : Optional.of(Enum.valueOf(enumClass, "hi"))); box.box(b ? Optional.absent() : Optional.of(Enum.valueOf(enumClass, "hi"))); } } }