Daniel Demus created GROOVY-9565:
------------------------------------

             Summary: StackoverflowError when using an abstract class with 
generic parameters as the return value of a closure
                 Key: GROOVY-9565
                 URL: https://issues.apache.org/jira/browse/GROOVY-9565
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 3.x, 2.5.x
            Reporter: Daniel Demus


If you try to compile the project at 
[https://github.com/demus-nine/groovy-class-generic-stackoverflowerror] groovyc 
crashes with a StackoverflowError. This happens in 
org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport#applyGenericsContext(java.util.Map<org.codehaus.groovy.ast.GenericsType.GenericsTypeName,org.codehaus.groovy.ast.GenericsType>,
 org.codehaus.groovy.ast.ClassNode) in this bit of recursive code:
{code:java}
if (bound.isArray()) {
    return applyGenericsContext(spec, bound.getComponentType()).makeArray();
}
{code}
although I have seen it throw in other methods in the StaticTypeCheckingSupport 
class.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to