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/05 13:30:58 UTC
[2/3] groovy git commit: GROOVY-7185: Add test (issue fixed by
changes for GROOVY-7849)
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/115d360b
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/115d360b
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/115d360b
Branch: refs/heads/GROOVY_2_4_X
Commit: 115d360b37cbe4c1bd2ba372867ee152a74d30bd
Parents: 83e6268
Author: Shil Sinha <sh...@apache.org>
Authored: Sat Jun 4 16:06:31 2016 -0400
Committer: Shil Sinha <sh...@apache.org>
Committed: Sun Jun 5 09:18:44 2016 -0400
----------------------------------------------------------------------
src/test/groovy/OverrideTest.groovy | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/115d360b/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()
+ '''
+ }
}