Stefanos Chaliasos created GROOVY-10113: -------------------------------------------
Summary: StackOverflowError in STC Key: GROOVY-10113 URL: https://issues.apache.org/jira/browse/GROOVY-10113 Project: Groovy Issue Type: Bug Components: Static Type Checker Affects Versions: 3.0.8, 4.0.0-alpha-2 Reporter: Stefanos Chaliasos I have the following Groovy program. {code:groovy} @groovy.transform.TypeChecked class Test<T extends T> {} {code} h2. Actual Behavior The compiler crashes with the following stacktrace. {code:java} >>> a serious error occurred: null >>> stacktrace: java.lang.StackOverflowError at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) .... at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) at org.codehaus.groovy.ast.ClassNode.redirect(ClassNode.java:195) {code} h2. Expected Behavior Compile-time error. I would expect to report a cyclic inheritance error. h2. Affected Version This programs have been tested with the compiler from the master (commit: c36c8bf3d24ce41e972e3f3e7a5763acf96f46b1), 4.0.0-alpha-2, and 3.0.8. -- This message was sent by Atlassian Jira (v8.3.4#803005)