Chih Chao Yu created GROOVY-9226:

             Summary: Call super.toString() with @TypeChecked or @CompileStatic 
will throw java.lang.StackOverflowError
                 Key: GROOVY-9226
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 2.4.x, 2.5.x
         Environment: Any operating systems running Groovy 2.4.x or 2.5.x
            Reporter: Chih Chao Yu

The following code snippet will throw java.lang.StackOverflowError:
import groovy.transform.CompileStatic
import groovy.transform.TypeChecked

class Super {
  String toString() { 'Super' }

class Child extends Super {
  String toString() { 'Child extends ' + super.toString() }

// java.lang.StackOverflowError will happen
println new Child().toString(){code}

This message was sent by Atlassian JIRA

Reply via email to