Skip to content

Commit d665d08

Browse files
committed
GROOVY-10525
1 parent 8816503 commit d665d08

File tree

1 file changed

+27
-0
lines changed
  • base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/xform

1 file changed

+27
-0
lines changed

base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/xform/TypeCheckedTests.java

+27
Original file line numberDiff line numberDiff line change
@@ -5230,4 +5230,31 @@ public void testTypeChecked10482b() {
52305230

52315231
runConformTest(sources);
52325232
}
5233+
5234+
@Test
5235+
public void testTypeChecked10525() {
5236+
//@formatter:off
5237+
String[] sources = {
5238+
"Main.groovy",
5239+
"@groovy.transform.TypeChecked\n" +
5240+
"void test(bean, List<Class<?>> types, Validator validator) {\n" +
5241+
" validator.validate(bean, types as Class<?>[])\n" +
5242+
"}\n",
5243+
5244+
"Validator.java",
5245+
"import java.util.*;\n" +
5246+
"public class Validator {\n" +
5247+
" @SafeVarargs public final <T> Set<Violation<T>>\n" +
5248+
" validate(T object, Class<?>... types) {\n" +
5249+
" return Collections.emptySet();\n" +
5250+
" }\n" +
5251+
"}\n",
5252+
5253+
"Violation.java",
5254+
"public interface Violation<T> { }\n",
5255+
};
5256+
//@formatter:on
5257+
5258+
runConformTest(sources);
5259+
}
52335260
}

0 commit comments

Comments
 (0)