When one executes the extract method refactoring on range
This is the result:
lb += 1
in the following snippetimport scala.collection.mutable.ListBuffer
object Test extends App {
def f {
val lb = ListBuffer(1)
lb += 1
}
}
This is the result:
import scala.collection.mutable.ListBuffer
object Test extends App {
def f {
val lb = ListBuffer(1)
g(lb)
}
private def g(lb: scala.collection.mutable.ListBuffer[Int]): Unit = {
lb += 1
}
ListBuffer
is extracted with its full name, but it should not.
Leave a comment
No file chosen
You have an empty file field. Please select or remove it.
Name | Size |
---|