diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/validation/OverrideValidationTest.java b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/validation/OverrideValidationTest.java index b30a005dc2c..123e5bdffe1 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/validation/OverrideValidationTest.java +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/validation/OverrideValidationTest.java @@ -476,8 +476,10 @@ public void testClassMustBeAbstract_06() throws Exception { } @Test public void testIncompatibleThrowsClause() throws Exception { - XtendClass xtendClass = clazz("class Foo extends test.ExceptionThrowing { override ioException() throws Exception {} }"); + var source = "class Foo extends test.ExceptionThrowing { override ioException() throws Exception {} }"; + XtendClass xtendClass = clazz(source); helper.assertError(xtendClass.getMembers().get(0), XTEND_FUNCTION, INCOMPATIBLE_THROWS_CLAUSE, + source.lastIndexOf("Exception"), "Exception".length(), "Exception", "not", "compatible", "throws", "clause"); }