[FIR] Fix lambda resolve in independent context
This commit is contained in:
+12
-12
@@ -3,49 +3,49 @@
|
||||
infix fun Function1<Int, Unit>.noInlineExt(p: Int) {}
|
||||
|
||||
inline infix fun Function1<Int, Unit>.inlineExt2(p: Int) {
|
||||
<!UNRESOLVED_REFERENCE!>{
|
||||
{
|
||||
noInlineExt(11)
|
||||
this.noInlineExt(11)
|
||||
this noInlineExt 11
|
||||
this
|
||||
}()<!>
|
||||
}()
|
||||
}
|
||||
|
||||
|
||||
inline fun Function1<Int, Unit>.inlineExt() {
|
||||
<!UNRESOLVED_REFERENCE!>{
|
||||
{
|
||||
inlineExt2(1)
|
||||
this.inlineExt2(1)
|
||||
this inlineExt2 1
|
||||
this(11)
|
||||
}()<!>
|
||||
}()
|
||||
}
|
||||
|
||||
inline fun inlineFunWithInvoke(s: (p: Int) -> Unit) {
|
||||
<!UNRESOLVED_REFERENCE!>{
|
||||
{
|
||||
s(11)
|
||||
s.invoke(11)
|
||||
s invoke 11
|
||||
}()<!>
|
||||
}()
|
||||
}
|
||||
|
||||
inline fun inlineFunWithInvokeNonInline(noinline s: (p: Int) -> Unit) {
|
||||
<!UNRESOLVED_REFERENCE!>{
|
||||
{
|
||||
s(11)
|
||||
s.invoke(11)
|
||||
s invoke 11
|
||||
}()<!>
|
||||
}()
|
||||
}
|
||||
|
||||
|
||||
inline fun testExtension(s: (p: Int) -> Unit) {
|
||||
<!UNRESOLVED_REFERENCE!>{
|
||||
{
|
||||
s.inlineExt()
|
||||
} ()<!>
|
||||
} ()
|
||||
}
|
||||
|
||||
inline fun inlineFunWrongExtension(s: (p: Int) -> Unit) {
|
||||
<!UNRESOLVED_REFERENCE!>{
|
||||
{
|
||||
s.noInlineExt(11)
|
||||
} ()<!>
|
||||
} ()
|
||||
}
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(crossinline p: () -> R) {
|
||||
<!UNRESOLVED_REFERENCE!>{
|
||||
{
|
||||
p()
|
||||
}()<!>
|
||||
}()
|
||||
}
|
||||
|
||||
inline fun <R> inlineFun(p: () -> R) {
|
||||
<!UNRESOLVED_REFERENCE!>{
|
||||
{
|
||||
p()
|
||||
}()<!>
|
||||
}()
|
||||
}
|
||||
|
||||
@@ -17,23 +17,23 @@ inline fun inlineFunWrongUsageExt(ext: Int.(p: Int) -> Unit) {
|
||||
}
|
||||
|
||||
inline fun inlineFunWrongUsageInClosure(s: (p: Int) -> Unit) {
|
||||
<!UNRESOLVED_REFERENCE!>{
|
||||
{
|
||||
s
|
||||
|
||||
if (true) s else 0
|
||||
|
||||
s ?: s
|
||||
}()<!>
|
||||
}()
|
||||
}
|
||||
|
||||
inline fun inlineFunWrongUsageInClosureExt(ext: Int.(p: Int) -> Unit) {
|
||||
<!UNRESOLVED_REFERENCE!>{
|
||||
{
|
||||
ext
|
||||
|
||||
if (true) ext else 0
|
||||
|
||||
ext ?: ext
|
||||
}()<!>
|
||||
}()
|
||||
}
|
||||
|
||||
inline fun inlineFunNoInline(noinline s: (p: Int) -> Unit) {
|
||||
|
||||
Reference in New Issue
Block a user