[FIR] Implement FUNCTION_EXPECTED
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ FILE: threeReceivers.kt
|
||||
}
|
||||
|
||||
public final fun R|FooBar|.chk(buz: R|Buz|): R|kotlin/Unit| {
|
||||
R|<local>/buz|.<Unresolved name: foobar>#()
|
||||
R|<local>/buz|.<Expression 'foobar' of type 'Bar' cannot be invoked as a function>#()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,6 +17,6 @@ class Foo {
|
||||
// this@Foo is dispatch receiver of foobar
|
||||
// Foo/foobar is dispatch receiver of invoke
|
||||
// this@chk is extension receiver of invoke
|
||||
buz.<!UNRESOLVED_REFERENCE!>foobar<!>()
|
||||
buz.<!FUNCTION_EXPECTED!>foobar<!>()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -28,5 +28,5 @@ FILE: test.kt
|
||||
lval res1: R|kotlin/String| = R|<local>/descriptor|.R|/WrappedPropertyDescriptor.setter|
|
||||
lval res2: <ERROR TYPE REF: Unresolved name: getSetter> = R|<local>/descriptor|.<Unresolved name: getSetter>#()
|
||||
lval res3: R|kotlin/Boolean| = R|<local>/descriptor|.R|/WrappedPropertyDescriptor.isDelegated|
|
||||
lval res4: <ERROR TYPE REF: Unresolved name: isDelegated> = R|<local>/descriptor|.<Unresolved name: isDelegated>#()
|
||||
lval res4: <ERROR TYPE REF: Expression 'isDelegated' of type 'kotlin/Boolean' cannot be invoked as a function> = R|<local>/descriptor|.<Expression 'isDelegated' of type 'kotlin/Boolean' cannot be invoked as a function>#()
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,5 +22,5 @@ fun test() {
|
||||
val res1 = descriptor.setter
|
||||
val res2 = descriptor.<!UNRESOLVED_REFERENCE!>getSetter<!>() // Should be error
|
||||
val res3 = descriptor.isDelegated
|
||||
val res4 = descriptor.<!UNRESOLVED_REFERENCE!>isDelegated<!>() // Should be error
|
||||
val res4 = descriptor.<!FUNCTION_EXPECTED!>isDelegated<!>() // Should be error
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: main.kt
|
||||
public final fun test(ann: R|Ann|): R|kotlin/Unit| {
|
||||
R|<local>/ann|.R|/Ann.value|
|
||||
R|<local>/ann|.<Unresolved name: value>#()
|
||||
R|<local>/ann|.<Expression 'value' of type 'kotlin/String' cannot be invoked as a function>#()
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -3,12 +3,12 @@
|
||||
// FILE: Ann.java
|
||||
|
||||
public @interface Ann {
|
||||
String value()
|
||||
String value();
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun test(ann: Ann) {
|
||||
ann.value
|
||||
ann.<!UNRESOLVED_REFERENCE!>value<!>() // should be an error
|
||||
ann.<!FUNCTION_EXPECTED!>value<!>() // should be an error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user