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

Paul King reassigned GROOVY-12470:
----------------------------------

    Assignee: Paul King

> SC: super-method calls do not work under static compilation
> -----------------------------------------------------------
>
>                 Key: GROOVY-12470
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12470
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.5.23, 3.0.25, 5.0.3, 4.0.33, 5.1.3, 6.0.0
>            Reporter: Björn Kautler
>            Assignee: Paul King
>            Priority: Major
>
> Given the following snippet:
> {code:groovy}
> @groovy.transform.CompileStatic
> class Foo {
>   def foo() {
>     super.toString()
>   }
>   @Override
>   String toString() {
>     "FOO: ${super.toString()}"
>   }
> }
> new Foo().foo()
> new Foo().toString()
> {code}
> Both calls in the end work fine without static compilation, but cause a 
> {{StackOverflowError}} because {{toString}} calls itself instead of the 
> super-method.
> Expected is like without static compilaton once the super {{toString}} and 
> for the second call the {{FOO}} prefix.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to