Skip to content

Commit

Permalink
also verify error position for INCOMPATIBLE_THROWS_CLAUSE
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed Jan 15, 2024
1 parent 2c1d2c4 commit f16ee5b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit f16ee5b

Please sign in to comment.