Skip to content

Commit

Permalink
also verify error's position for field INVALID_USE_OF_TYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed Dec 20, 2023
1 parent ebe95d6 commit 759e7c7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,10 @@ public void clearPreferences() {
}

@Test public void testVoidInDependency() throws Exception {
XtendClass clazz = clazz("class X { @Inject void v }");
helper.assertError(clazz, TypesPackage.Literals.JVM_TYPE_REFERENCE, INVALID_USE_OF_TYPE);
var source = "class X { @Inject void v }";
XtendClass clazz = clazz(source);
helper.assertError(clazz, TypesPackage.Literals.JVM_TYPE_REFERENCE, INVALID_USE_OF_TYPE,
source.indexOf("void"), "void".length());
}

@Test public void testVoidInReturn() throws Exception {
Expand Down

0 comments on commit 759e7c7

Please sign in to comment.