You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2022/02/03 22:30:00 UTC
[jira] [Closed] (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 ]
Paul King closed GROOVY-9391.
-----------------------------
> 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
> Fix For: 4.0.0-rc-2
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {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)