use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testDuplicateInterfaceMethod_7.
@Test
public void testDuplicateInterfaceMethod_7() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo { def <T extends CharSequence> void bar(T t) def <V extends String> void bar(V v) }");
helper.assertNoErrors(xtendInterface);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceCompatibleThrowsClause_05.
@Test
public void testInterfaceCompatibleThrowsClause_05() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.ExceptionThrowingInterface { override throwable() throws Exception }");
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 testInterfaceIncompatibleReturnType_0.
@Test
public void testInterfaceIncompatibleReturnType_0() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.SuperInterface { override Boolean string() }");
helper.assertError(xtendInterface.getMembers().get(0), XTEND_FUNCTION, INCOMPATIBLE_RETURN_TYPE);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testOverrideGenericInterfaceMethod_6.
@Test
public void testOverrideGenericInterfaceMethod_6() throws Exception {
XtendInterface xtendInterface = interfaze(" import java.util.List interface Foo<T> extends test.GenericSuperTypeInterface<T> { " + "override <T3> getValue6(List<? extends T3> t) " + "}");
helper.assertNoErrors(xtendInterface);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceMissingOverride_1.
@Test
public void testInterfaceMissingOverride_1() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.SuperInterface { def string(int i) }");
helper.assertNoError(xtendInterface.getMembers().get(0), MISSING_OVERRIDE);
}
Aggregations