Update test data for tower resolution algorithm
- locals win - unary calls to plus/minus are not supported in favor of unaryPlus/unaryMinus - unqualified nested classes are temporarily reported as unresolved - function without receiver win against extension function - explicit import win against star import
This commit is contained in:
committed by
Stanislav Erokhin
parent
66a031f7a0
commit
239502368a
+6
-3
@@ -9,9 +9,12 @@ class Foo {
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
<!TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR!>with<!>("", <!TYPE_MISMATCH!>{
|
||||
Foo.<!MISSING_RECEIVER, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>findByName<!>("")
|
||||
}<!>)
|
||||
with("", {
|
||||
Foo.<!UNRESOLVED_REFERENCE!>findByName<!>("")
|
||||
})
|
||||
with(Foo) {
|
||||
findByName("")
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> with(t: T, f: T.() -> Unit) {}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
package kt1875
|
||||
|
||||
fun f(a : Int?, b : Int.(Int)->Int) = a?.b(1) //unnecessary safe call warning
|
||||
fun foo(a : Int?, b : Int.(Int)->Int) = a?.b(1) //unnecessary safe call warning
|
||||
|
||||
interface T {
|
||||
val f : ((i: Int) -> Unit)?
|
||||
@@ -14,7 +14,7 @@ fun test(t: T) {
|
||||
}
|
||||
|
||||
fun test1(t: T?) {
|
||||
t<!UNSAFE_CALL!>.<!><!UNSAFE_CALL!>f<!>(1)
|
||||
t<!UNSAFE_CALL!>.<!><!FUNCTION_EXPECTED!>f<!>(1) // todo resolve f as value and report UNSAFE_CALL
|
||||
t?.<!UNSAFE_CALL!>f<!>(1)
|
||||
t<!UNSAFE_CALL!>.<!>f?.invoke(1)
|
||||
t?.f?.invoke(1)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
package kt1875 {
|
||||
public fun f(/*0*/ a: kotlin.Int?, /*1*/ b: kotlin.Int.(kotlin.Int) -> kotlin.Int): kotlin.Int?
|
||||
public fun foo(/*0*/ a: kotlin.Int?, /*1*/ b: kotlin.Int.(kotlin.Int) -> kotlin.Int): kotlin.Int?
|
||||
public fun test(/*0*/ t: kt1875.T): kotlin.Unit
|
||||
public fun test1(/*0*/ t: kt1875.T?): kotlin.Unit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user