Misc: Do not use resolved call of outer expression if current call expression has no callee
#KT-10105 Fixed
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
== foo ==
|
||||
fun foo() {
|
||||
int x = ()()
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
2 mark({ int x = ()() })
|
||||
magic[UNRESOLVED_CALL](int) -> <v0>
|
||||
mark(= ())
|
||||
magic[UNRESOLVED_CALL](= ()) -> <v1>
|
||||
mark(= ()())
|
||||
call(= ()(), <ERROR FUNCTION>|<v1>) -> <v2>
|
||||
magic[VALUE_CONSUMER](= ()()|<v2>) -> <v3>
|
||||
mark(int x = ()())
|
||||
call(int x = ()(), <ERROR FUNCTION>|<v0>) -> <v4>
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
int x = ()()
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
== foo ==
|
||||
fun foo() {
|
||||
int x = ()()
|
||||
}
|
||||
---------------------
|
||||
<v3>: * NEW: magic[VALUE_CONSUMER](= ()()|<v2>) -> <v3>
|
||||
int <v0>: * NEW: magic[UNRESOLVED_CALL](int) -> <v0>
|
||||
= () <v1>: * NEW: magic[UNRESOLVED_CALL](= ()) -> <v1>
|
||||
= ()() <v2>: * NEW: call(= ()(), <ERROR FUNCTION>|<v1>) -> <v2>
|
||||
int x = ()() <v4>: * NEW: call(int x = ()(), <ERROR FUNCTION>|<v0>) -> <v4>
|
||||
{ int x = ()() } <v4>: * COPY
|
||||
=====================
|
||||
Reference in New Issue
Block a user