Skip to content

Commit

Permalink
GROOVY-9500
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Oct 17, 2021
1 parent 7bec9d2 commit c0a8850
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -5009,6 +5009,41 @@ public void testCompileStatic9454() {
runConformTest(sources, "works");
}

@Test
public void testCompileStatic9500() {
//@formatter:off
String[] sources = {
"Main.groovy",
"trait Entity<D> {\n" +
"}\n" +
"@groovy.transform.CompileStatic @SuppressWarnings('rawtypes')\n" +
"abstract class Path<F extends Entity, T extends Entity> implements Iterable<Path.Segment<F,T>> {\n" +
" interface Segment<F, T> {\n" +
" F start()\n" +
" T end()\n" +
" }\n" +
" abstract F start()\n" +
" T end\n" +
" T end() {\n" +
" end\n" + // Cannot return value of type Path$Segment<F,T> on method returning type T
" }\n" +
" @Override\n" +
" void forEach(java.util.function.Consumer<? super Segment<F, T>> action) {\n" +
" }\n" +
" @Override\n" +
" Spliterator<Segment<F, T>> spliterator() {\n" +
" }\n" +
" @Override\n" +
" Iterator<Segment<F, T>> iterator() {\n" +
" }\n" +
"}\n" +
"null\n",
};
//@formatter:on

runNegativeTest(sources, "");
}

@Test
public void testCompileStatic9517() {
//@formatter:off

0 comments on commit c0a8850

Please sign in to comment.