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:
Alefas
2012-02-08 17:07:38 +04:00
parent 7bbc121f72
commit 6fe52d15b4
17 changed files with 317 additions and 21 deletions
+2 -1
View File
@@ -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)
}
}
+2
View File
@@ -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)
+8 -5
View File
@@ -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
}