Few fixes to Introduce Variable (no new features added)
Added few tests to Introduce Variable More strict requirements for expressions to introduce it.
This commit is contained in:
@@ -17,7 +17,8 @@ fun main(args : Array<String>) {
|
||||
// add watched directory
|
||||
FileSystem.write {
|
||||
for (arg in args) {
|
||||
FileSystem.addWatchedDirectory(FileSystem.getFileByPath(arg))
|
||||
val virtualFile = FileSystem.getFileByPath(arg)
|
||||
FileSystem.addWatchedDirectory(virtualFile)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import java.util.Timer
|
||||
import java.util.TimerTask
|
||||
|
||||
import org.jetbrains.jet.samples.vfs.utils.*
|
||||
import org.jetbrains.jet.samples.vfs.utils.listDifference
|
||||
|
||||
/**
|
||||
* Singleton which creates thread for periodically checking if there are changes in
|
||||
@@ -55,6 +56,7 @@ internal object RefreshQueue {
|
||||
val oldChildren = fileInfo.children
|
||||
val newChildren = file.children()
|
||||
|
||||
|
||||
val addedChildren = listDifference(newChildren, oldChildren)
|
||||
val deletedChildren = listDifference(oldChildren, newChildren)
|
||||
val commonChildren = listIntersection(oldChildren, newChildren)
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
fun x(x: Int = 1) {}
|
||||
/*
|
||||
val i = 1
|
||||
fun x(x: Int = i) {}
|
||||
*/
|
||||
fun a(op: (Int) -> Int) {}
|
||||
fun b() {
|
||||
a {it}
|
||||
a {
|
||||
it
|
||||
}
|
||||
2 + 2
|
||||
}
|
||||
Reference in New Issue
Block a user