[prev in list] [next in list] [prev in thread] [next in thread]
List: groovy-scm
Subject: [groovy-scm] [jira] Issue Comment Edited: (GRECLIPSE-907) Extract local variable
From: "Andrew Eisenberg (JIRA)" <jira () codehaus ! org>
Date: 2011-09-30 23:37:17
Message-ID: 1215735441.10716.1317425837182.JavaMail.j2ee-jira () codehaus01-new ! managed ! contegix ! com
[Download RAW message or body]
[ https://jira.codehaus.org/browse/GRECLIPSE-907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=280416#comment-280416 \
]
Andrew Eisenberg edited comment on GRECLIPSE-907 at 9/30/11 6:36 PM:
---------------------------------------------------------------------
I have a fix locally. Need to write some tests and then I will commit.
was (Author: werdna):
I have a fix locally. Need to do write some tests and then I will commit.
> Extract local variable extracts the variable outside the scope of the closure which \
> is incorrect
> ------------------------------------------------------------------------------------------------
>
> Key: GRECLIPSE-907
> URL: https://jira.codehaus.org/browse/GRECLIPSE-907
> Project: GRECLIPSE
> Issue Type: Bug
> Components: Refactoring
> Affects Versions: 2.1.0Release
> Reporter: Graeme Rocher
> Assignee: Andrew Eisenberg
> Fix For: 2.6.0.Release
>
>
> Given the following example:
> {code}
> class Simple {
> def test() {
> def map = [one:"two"]
> def foo = {
> println map.one
> }
> }
> }
> {code}
> If you run extract variable on map.one you get:
> {code}
> class Simple {
> def test() {
> def map = [one:"two"]
> def mapOne = map.one
> def foo = {
> println mapOne
> }
> }
> }
> {code}
> Which is incorrect. The variable should be within the scope of the closure above \
> the println statement
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
<hr/>
<p>
To unsubscribe from this list please visit:
</p>
<p>
<a href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic