blob: 4c9ec33c89f49e05f6e3589d2f8e2cd1615d82fa [file] [log] [blame]
// checks that types can be inferred for constants defined in interfaces
import org.checkerframework.checker.testchecker.wholeprograminference.qual.Sibling1;
@SuppressWarnings("cast.unsafe")
interface InterfaceTest {
public String toaster = getSibling1();
public static @Sibling1 String getSibling1() {
return (@Sibling1 String) "foo";
}
default void requireSibling1(@Sibling1 String x) {}
default void testX() {
// :: warning: argument
requireSibling1(toaster);
}
}