Skip to content

Commit

Permalink
test for WILDCARD_IN_SUPERTYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed Feb 5, 2024
1 parent 747984f commit 442a482
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,15 @@ public class JvmGenericTypeValidatorTest {
"override", "final");
}

@Test
public void testWildcardSuperType() throws Exception {
var source = "class Foo extends Bar<?>{}"
+ "class Bar<T> {}";
var model = parse(source);
validationHelper.assertError(model, MY_CLASS, WILDCARD_IN_SUPERTYPE,
source.indexOf("Bar<?>"), "Bar<?>".length());
}

@Test public void testConstructorDuplicate() throws Exception {
var source = "class K { constructor (Object o) {} constructor (Object o) {} }";
var model = parse(source);
Expand Down

0 comments on commit 442a482

Please sign in to comment.