use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceCompatibleThrowsClause_06.
@Test
public void testInterfaceCompatibleThrowsClause_06() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.ExceptionThrowingInterface { override throwable() throws Throwable }");
helper.assertNoError(xtendInterface.getMembers().get(0), INCOMPATIBLE_THROWS_CLAUSE);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testOverrideGenericInterfaceMethod_14.
@Test
public void testOverrideGenericInterfaceMethod_14() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.GenericSuperTypeInterface<String> { " + "override <X extends Comparable<X>> void useComparable(X x) " + "}");
helper.assertNoErrors(xtendInterface);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceCompatibleThrowsClause_09.
@Test
public void testInterfaceCompatibleThrowsClause_09() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.ExceptionThrowingInterface { override <E extends java.io.IOException> generifiedIoException() throws E }");
helper.assertNoError(xtendInterface.getMembers().get(0), INCOMPATIBLE_THROWS_CLAUSE);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testOverrideGenericInterfaceMethod_1.
@Test
public void testOverrideGenericInterfaceMethod_1() throws Exception {
XtendInterface xtendInterface = interfaze(" import java.util.List interface Foo<T> extends test.GenericSuperTypeInterface<T> { " + "override <RenamedT1> getValue1(List<RenamedT1> t)" + "}");
helper.assertNoErrors(xtendInterface);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testOverrideGenericInterfaceMethod_13.
@Test
public void testOverrideGenericInterfaceMethod_13() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.GenericSuperTypeInterface<String> { " + "override <C extends Comparable<C>> C getComparable()" + "}");
helper.assertNoErrors(xtendInterface);
}
Aggregations