Rename refactoring breaks when default arguments and comments/spaces are involved
Renaming
Further examples can be constructed easily by playing around with the comments and spaces.
renameMe
to ups
inobject X extends App {
O() /*Please*/ . /*let me survive!*/ /*(*/renameMe/*)*/meth()
}
class C {
def meth(j: Int = 0) = j
}
class O {
def renameMe: C = ???
}
object O {
def apply(): O = ???
}
yields object X extends App {
O()ups/*)*/meth()
}
class C {
def meth(j: Int = 0) = j
}
class O {
def ups: C = ???
}
object O {
def apply(): O = ???
}
Applying the same rename operation toobject X extends App {
O()./**/test/**/ /*Please don't forget about me!!!!*/ /*(*/.renameMe/*)*/()
}
class C {
def renameMe(j: Int = 0) = j
}
class O {
def test: C = ???
}
object O {
def apply(): O = ???
}
yields object X extends App {
O()./**/test ups/*)*/()
}
class C {
def ups(j: Int = 0) = j
}
class O {
def test: C = ???
}
object O {
def apply(): O = ???
}
Further examples can be constructed easily by playing around with the comments and spaces.
Leave a comment
Consider exotic but legal places for comments and spaces
This commit fixes a workaround that eventually makes sure that parenthesis
and dots are printed out in `Selects` involving default arguments.
See #1002611 and #1002564 as well as
[PR #112](https://github.com/scala-ide/scala-refactoring/pull/112#discussion_r46948682)
for further details.
Fixes #1002611 together with the last commit
Branch: master
Commit: scala-ide:326c47fa77
This commit fixes a workaround that eventually makes sure that parenthesis
and dots are printed out in `Selects` involving default arguments.
See #1002611 and #1002564 as well as
[PR #112](https://github.com/scala-ide/scala-refactoring/pull/112#discussion_r46948682)
for further details.
Fixes #1002611 together with the last commit
Branch: master
Commit: scala-ide:326c47fa77