You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by sh...@apache.org on 2016/06/04 20:26:31 UTC

groovy git commit: GROOVY-7185: Add test (issue fixed by changes for GROOVY-7849)

Repository: groovy
Updated Branches:
  refs/heads/master 7c25c4197 -> 0b3311357


GROOVY-7185: Add test (issue fixed by changes for GROOVY-7849)


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

Branch: refs/heads/master
Commit: 0b3311357a8bcd4b17a97ddf212724ffd96300f2
Parents: 7c25c41
Author: Shil Sinha <sh...@apache.org>
Authored: Sat Jun 4 16:06:31 2016 -0400
Committer: Shil Sinha <sh...@apache.org>
Committed: Sat Jun 4 16:06:31 2016 -0400

----------------------------------------------------------------------
 src/test/groovy/OverrideTest.groovy | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/0b331135/src/test/groovy/OverrideTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/OverrideTest.groovy b/src/test/groovy/OverrideTest.groovy
index cf620ed..db7537f 100644
--- a/src/test/groovy/OverrideTest.groovy
+++ b/src/test/groovy/OverrideTest.groovy
@@ -192,4 +192,28 @@ def d = new Derived()
             new C().foo()
         '''
     }
+
+    //GROOVY-7185
+    void testArrayReturnTypeCovarianceGenericsVariant() {
+        assertScript '''
+            public interface A<T> {
+                T[] process();
+            }
+
+            public class B implements A<String> {
+                @Override
+                public String[] process() {
+                    return new String[0];
+                }
+            }
+
+            class C extends B {
+                @Override
+                String[] process() {
+                    return super.process()
+                }
+            }
+            new C()
+        '''
+    }
 }