[
https://issues.apache.org/jira/browse/GROOVY-9000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17147136#comment-17147136
]
Paul King commented on GROOVY-9000:
-----------------------------------
Perhaps we should document this somewhere?
> Unexpected type for super within non-static inner class
> -------------------------------------------------------
>
> Key: GROOVY-9000
> URL: https://issues.apache.org/jira/browse/GROOVY-9000
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.4.16
> Reporter: Eric Milles
> Priority: Major
>
> Consider the following:
> {code:groovy}
> class Foo {
> class Bar {
> def baz() {
> super
> }
> }
> }
> {code}
> If I create an instance of Bar and call baz(), I receive the instance of Bar
> as the return value. That is "super" in this context maps to the inner class
> itself. This causes "super.whatever" to work like "this.whatever" or
> implicit-this "whatever", which is unexpected. For example, I was able to
> call a private method of Foo using "super.method()" when I would expect
> method missing instead.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)