You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2018/05/22 04:41:30 UTC
groovy git commit: Refine the test of GROOVY-8531
Repository: groovy
Updated Branches:
refs/heads/master b0d79332a -> 416a69371
Refine the test of GROOVY-8531
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/416a6937
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/416a6937
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/416a6937
Branch: refs/heads/master
Commit: 416a693719781ff4f15dffe8acfdf0bd911c4c73
Parents: b0d7933
Author: sunlan <su...@apache.org>
Authored: Tue May 22 12:41:15 2018 +0800
Committer: sunlan <su...@apache.org>
Committed: Tue May 22 12:41:26 2018 +0800
----------------------------------------------------------------------
src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy | 4 ++++
src/test/groovy/bugs/groovy8531/Reducer.java | 6 +++++-
2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/416a6937/src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy b/src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy
index 2369d88..53a71f2 100644
--- a/src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy
+++ b/src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy
@@ -33,6 +33,8 @@ class Groovy8531Bug extends GroovyTestCase {
public void reduce7(PublicStaticBaseContext context) {}
public void reduce8(ProtectedStaticBaseContext context) {}
+ public void reduce9(InterfaceContext context) {}
+
public boolean isDynamic(Type type) {
return Type.DYNAMIC == type
}
@@ -48,6 +50,8 @@ class Groovy8531Bug extends GroovyTestCase {
new Example().reduce7(null)
new Example().reduce8(null)
+ new Example().reduce9(null)
+
assert new Example().isDynamic(Reducer.Type.DYNAMIC)
'''
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/416a6937/src/test/groovy/bugs/groovy8531/Reducer.java
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/groovy8531/Reducer.java b/src/test/groovy/bugs/groovy8531/Reducer.java
index 6cf865f..8652196 100644
--- a/src/test/groovy/bugs/groovy8531/Reducer.java
+++ b/src/test/groovy/bugs/groovy8531/Reducer.java
@@ -18,6 +18,10 @@
*/
package groovy.bugs.groovy8531;
+interface Reducable {
+ class InterfaceContext {}
+}
+
class BaseReducer {
public abstract class PublicBaseContext {}
protected abstract class ProtectedBaseContext {}
@@ -26,7 +30,7 @@ class BaseReducer {
private abstract class PrivateBaseContext {}
}
-public class Reducer extends BaseReducer {
+public class Reducer extends BaseReducer implements Reducable {
public abstract class PublicContext {}
protected abstract class ProtectedContext {}
public static abstract class PublicStaticContext {}