You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/12/06 14:36:00 UTC

[jira] [Assigned] (GROOVY-9391) Casting the superclass object and calling it stack overflows

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

Eric Milles reassigned GROOVY-9391:
-----------------------------------

    Assignee: Eric Milles

> Casting the superclass object and calling it stack overflows
> ------------------------------------------------------------
>
>                 Key: GROOVY-9391
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9391
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: death lord
>            Assignee: Eric Milles
>            Priority: Minor
>
> {code:groovy}
> import groovy.transform.CompileStatic as S
> @S class A { def oo() { println 'a' } }
> @S class B extends A { def oo() { println 'b' } }
> @S class C extends B { def oo() { ((A) super).oo() } }
> new C().oo(){code}
> Either casting super should give an error or there should be functionality to use some method handle to do this.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)