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/12 16:53:00 UTC
[jira] [Resolved] (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 resolved GROOVY-9391.
---------------------------------
Fix Version/s: 4.0.0-rc-2
Resolution: Fixed
https://github.com/apache/groovy/commit/ce24e8f87dc8cdbf249d8e4b9c70cbd5df1d7f7b
> 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)