Fixed bug with importing some of SAM-constructors and factory functions

#KT-3449 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-02-09 21:24:49 +03:00
parent 2c5953dbe6
commit 546836d5dd
11 changed files with 94 additions and 3 deletions
@@ -0,0 +1,11 @@
// "Import" "true"
import java.util.Collections
import java.util.ArrayList
import java.util.Comparator
fun foo() {
Collections.sort(
ArrayList<Int>(),
<caret>Comparator {(x: Int, y: Int) -> x - y }
)
}
@@ -0,0 +1,10 @@
// "Import" "true"
import java.util.Collections
import java.util.ArrayList
fun foo() {
Collections.sort(
ArrayList<Int>(),
<caret>Comparator {(x: Int, y: Int) -> x - y }
)
}
@@ -0,0 +1,8 @@
// "Import" "true"
// ERROR: Unresolved reference: XXX
import ppp.XXX
fun f() {
XXX { 1 }
}
@@ -0,0 +1,6 @@
// "Import" "true"
// ERROR: Unresolved reference: XXX
fun f() {
<caret>XXX { 1 }
}
@@ -0,0 +1,5 @@
package ppp
class XXX
fun XXX(p: () -> Int){}