use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceObsoleteOverride_1.
@Test
public void testInterfaceObsoleteOverride_1() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.SuperInterface { override bar() }");
helper.assertError(xtendInterface.getMembers().get(0), XTEND_FUNCTION, OBSOLETE_OVERRIDE);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceOverrideReturnType_2.
@Test
public void testInterfaceOverrideReturnType_2() throws Exception {
XtendInterface xtendInterface = interfaze("import java.util.List import java.io.Serializable interface Foo<T> extends test.GenericSuperTypeInterface<T> { " + "override <T3> List<T3> getValue3(List<T3> t)" + "}");
helper.assertNoErrors(xtendInterface);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceCompatibleThrowsClause.
@Test
public void testInterfaceCompatibleThrowsClause() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.ExceptionThrowingInterface { override ioException() throws java.io.FileNotFoundException }");
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_4.
@Test
public void testOverrideGenericInterfaceMethod_4() throws Exception {
XtendInterface xtendInterface = interfaze(" import java.util.List interface Foo<T> extends test.GenericSuperTypeInterface<T> { " + "override <T3> getValue4(List<T3[]> t) " + "}");
helper.assertNoErrors(xtendInterface);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceIncompatibleThrowsClause_03.
@Test
public void testInterfaceIncompatibleThrowsClause_03() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.ExceptionThrowingInterface { override noException() throws Exception }");
helper.assertError(xtendInterface.getMembers().get(0), XTEND_FUNCTION, INCOMPATIBLE_THROWS_CLAUSE, "Exception", "not", "compatible", "throws", "clause");
}
Aggregations