Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.8.6
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:OS X 10.6.8. Apple Java
-
Testcase included:yes
-
Number of attachments :
Description
Calling this script:
public interface Copyable { public Object deepCopy(); } class GroovyA implements Copyable { public GroovyA deepCopy() { println("GroovyA.deepCopy()") return this; } } class GroovyB extends GroovyA { public GroovyB deepCopy() { super.deepCopy(); println("GroovyB.deepCopy()") this } } new GroovyB().deepCopy()
causes a StackOverError
I am seeing the same thing when trying to override ArrayList<E>.iterator(). Since iterator() is a Generic function whose return type could be anything, could Generic return types cause this as well?