[
https://issues.apache.org/jira/browse/GROOVY-9226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Sun updated GROOVY-9226:
-------------------------------
Fix Version/s: 3.0.0-beta-4
> 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
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 3.0.0-beta-4
>
>
> 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)