You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by bl...@apache.org on 2015/07/09 17:57:45 UTC

[3/3] incubator-groovy git commit: GROOVY-7495: additional test case

GROOVY-7495: additional test case


Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/e106b78d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/e106b78d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/e106b78d

Branch: refs/heads/master
Commit: e106b78dc9414f9cd453c6154808feb3deac19ca
Parents: 7240888
Author: Jochen Theodorou <bl...@gmx.org>
Authored: Thu Jul 9 17:53:01 2015 +0200
Committer: Jochen Theodorou <bl...@gmx.org>
Committed: Thu Jul 9 17:53:01 2015 +0200

----------------------------------------------------------------------
 .../gls/invocation/CovariantReturnTest.groovy    | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/e106b78d/src/test/gls/invocation/CovariantReturnTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/gls/invocation/CovariantReturnTest.groovy b/src/test/gls/invocation/CovariantReturnTest.groovy
index 44b8d97..9f6648d 100644
--- a/src/test/gls/invocation/CovariantReturnTest.groovy
+++ b/src/test/gls/invocation/CovariantReturnTest.groovy
@@ -204,6 +204,25 @@ public class CovariantReturnTest extends CompilableTestSupport {
             interface Second extends First {}
             class SecondImpl extends FirstImpl implements Second {}
         """
+        shouldCompile """
+            interface A {
+               B foo()
+            }
+            interface B {}
+            interface A2 extends A {
+               B2 foo()
+            }
+            interface B2 extends B {}
+
+            class AA implements A {
+               BB foo() { return new BB() }
+            }
+            class AA2 extends AA implements A2 {
+               BB2 foo() { return new BB2() }
+            }
+            class BB implements B {}
+            class BB2 extends BB implements B2 {}
+        """
     }
 
     void testCovariantParameterType() {