Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.1.0Release
-
Fix Version/s: 2.6.0.Release
-
Component/s: Refactoring
-
Labels:None
-
Number of attachments :
Description
Given the following example:
class Simple {
def test() {
def map = [one:"two"]
def foo = {
println map.one
}
}
}
If you run extract variable on map.one you get:
class Simple {
def test() {
def map = [one:"two"]
def mapOne = map.one
def foo = {
println mapOne
}
}
}
Which is incorrect. The variable should be within the scope of the closure above the println statement