Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
testSimilarNamesForMethodAndLocalWithLocalAsMethodArgument fails.
class DelegationTest extends GroovyTestCase { void testSimilarNamesForMethodAndLocalWithLocalAsMethodArgument() { new Executer().failingExecute() } void testSimilarNamesForMethodAndLocalWithNoArgMethod() { new Executer().workingExecute() } } class Executer { void convention(String arg) { println 'called' } void convention() { println 'called' } void failingExecute() { def convention= 'value' 10.times { this.convention(convention) } } void workingExecute() { def convention= 'value' 10.times { this.convention() } } }
Attachments
Issue Links
- is related to
-
GROOVY-3156 Within a nested closure, "this.method()" works incorrectly if parent closure and outermost class have closures/methods of the same name
- Closed