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
Vendored
+2
-2
@@ -5,7 +5,7 @@ fun test1(f: String.() -> Unit) {
|
||||
}
|
||||
|
||||
fun test2(f: (Int) -> Int) {
|
||||
1.<!INVOKE_EXTENSION_ON_NOT_EXTENSION_FUNCTION!>f<!>(<!TOO_MANY_ARGUMENTS!>2<!>)
|
||||
1.<!UNRESOLVED_REFERENCE!>f<!>(2)
|
||||
|
||||
2.<!INVOKE_EXTENSION_ON_NOT_EXTENSION_FUNCTION!>(f)<!>(<!TOO_MANY_ARGUMENTS!>2<!>)
|
||||
2.<!NO_RECEIVER_ALLOWED!>(f)<!>(2)
|
||||
}
|
||||
Vendored
+2
-2
@@ -3,8 +3,8 @@ interface Foo {
|
||||
operator fun A.invoke()
|
||||
}
|
||||
|
||||
fun test(a: A, foo: Foo) {
|
||||
a.<!INVOKE_EXTENSION_ON_NOT_EXTENSION_FUNCTION!>foo<!>()
|
||||
fun test(a: A, <!UNUSED_PARAMETER!>foo<!>: Foo) {
|
||||
a.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
}
|
||||
|
||||
fun test(a: Int, foo: Int.()->Unit) {
|
||||
|
||||
Vendored
+3
-3
@@ -12,7 +12,7 @@ fun test(a: A, b: B) {
|
||||
a.foo(b)
|
||||
|
||||
with(a) {
|
||||
b.<!MISSING_RECEIVER!>foo<!>() // todo
|
||||
b.foo()
|
||||
|
||||
b.(foo)()
|
||||
|
||||
@@ -23,7 +23,7 @@ fun test(a: A, b: B) {
|
||||
}
|
||||
|
||||
with(b) {
|
||||
a.<!INVOKE_ON_EXTENSION_FUNCTION_WITH_EXPLICIT_DISPATCH_RECEIVER!>foo<!>()
|
||||
a.foo(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.<!FUNCTION_EXPECTED!>(<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>)<!>()
|
||||
|
||||
(a.foo)()
|
||||
@@ -68,7 +68,7 @@ fun test(a: A, b: B) {
|
||||
}
|
||||
|
||||
with(b) {
|
||||
a.<!INVOKE_ON_EXTENSION_FUNCTION_WITH_EXPLICIT_DISPATCH_RECEIVER!>foo<!>()
|
||||
a.foo(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.<!FUNCTION_EXPECTED!>(<!UNRESOLVED_REFERENCE!>foo<!>)<!>()
|
||||
|
||||
(a.foo)()
|
||||
|
||||
@@ -6,7 +6,7 @@ class B
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
with(b) {
|
||||
a.<!INVOKE_ON_EXTENSION_FUNCTION_WITH_EXPLICIT_DISPATCH_RECEIVER!>foo<!>() // here must be error, because a is not extension receiver
|
||||
a.foo(<!NO_VALUE_FOR_PARAMETER!>)<!> // here must be error, because a is not extension receiver
|
||||
|
||||
a.foo(this)
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ val B.a: () -> Int get() = { 5 }
|
||||
fun test(a: A, b: B) {
|
||||
val <!UNUSED_VARIABLE!>x<!>: Int = b.a()
|
||||
|
||||
b.<!INVOKE_EXTENSION_ON_NOT_EXTENSION_FUNCTION!>(a)<!>()
|
||||
b.<!FUNCTION_EXPECTED!>(a)<!>()
|
||||
|
||||
with(b) {
|
||||
val <!UNUSED_VARIABLE!>y<!>: Int = a()
|
||||
<!MISSING_RECEIVER!>(a)<!>()
|
||||
<!FUNCTION_EXPECTED!>(a)<!>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user