You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Chih Chao Yu (JIRA)" <ji...@apache.org> on 2019/08/15 07:09:00 UTC

[jira] [Updated] (GROOVY-9226) Calling super.toString() with @TypeChecked or @CompileStatic will throw java.lang.StackOverflowError

     [ https://issues.apache.org/jira/browse/GROOVY-9226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chih Chao Yu updated GROOVY-9226:
---------------------------------
    Summary: Calling super.toString() with @TypeChecked or @CompileStatic will throw java.lang.StackOverflowError  (was: Call super.toString() with @TypeChecked or @CompileStatic will throw java.lang.StackOverflowError)

> Calling super.toString() with @TypeChecked or @CompileStatic will throw java.lang.StackOverflowError
> ----------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-9226
>                 URL: https://issues.apache.org/jira/browse/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
>            Priority: Major
>
> The following code snippet will throw java.lang.StackOverflowError:
> {code:java}
> import groovy.transform.CompileStatic
> import groovy.transform.TypeChecked
> @CompileStatic
> class Super {
>   String toString() { 'Super' }
> }
> @TypeChecked
> @CompileStatic
> 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
(v7.6.14#76016)