[FIR] Optimization & checking fix: remove usage of dispatchReceiverValue

This commit is contained in:
simon.ogorodnik
2019-12-25 17:23:44 +03:00
committed by Mikhail Glukhikh
parent 686965c0d3
commit 5e426fdc71
114 changed files with 268 additions and 302 deletions
@@ -4,6 +4,6 @@ class A() {
val x = 1
companion object {
val y = <!UNRESOLVED_REFERENCE!>x<!>
val y = x
}
}
@@ -4,6 +4,6 @@ class Test {
fun test(): Int = 12
companion object {
val a = <!UNRESOLVED_REFERENCE!>test<!>() // Check if resolver will be able to infer type of a variable
val a = test() // Check if resolver will be able to infer type of a variable
}
}
@@ -8,7 +8,7 @@ class My {
companion object {
val y = <!UNRESOLVED_REFERENCE!>foo<!>()
val y = foo()
val u = bar()
@@ -7,7 +7,7 @@ public class Z {
class Local {
public inline fun a() {
<!UNRESOLVED_REFERENCE!>privateProperty<!>
privateProperty
}
}
@@ -1,6 +1,6 @@
enum class E {
E1 {
override fun foo() = <!UNRESOLVED_REFERENCE!>outerFun<!>() + super.<!UNRESOLVED_REFERENCE!>outerFun<!>()
override fun foo() = outerFun() <!AMBIGUITY!>+<!> super.<!UNRESOLVED_REFERENCE!>outerFun<!>()
},
E2 {
override fun foo() = E1.foo()
@@ -12,8 +12,8 @@ class Test {
fun more(): InnerClass {
val b = InnerClass()
val testVal = <!UNRESOLVED_REFERENCE!>inClass<!>
<!UNRESOLVED_REFERENCE!>foo<!>()
val testVal = inClass
foo()
return b
}
@@ -12,8 +12,8 @@ class Test {
fun more(): InnerClass {
val b = InnerClass()
val testVal = <!UNRESOLVED_REFERENCE!>inClass<!>
<!UNRESOLVED_REFERENCE!>foo<!>()
val testVal = inClass
foo()
return b
}
@@ -3,10 +3,10 @@ class Outer {
if (outerState > 0) return outerState
class Local {
val localState = <!UNRESOLVED_REFERENCE!>outerState<!>
val localState = outerState
inner class LocalInner {
val o = <!UNRESOLVED_REFERENCE!>outerState<!>
val o = outerState
val l = localState
}
}
@@ -2,7 +2,7 @@ class Outer {
class Nested {
fun foo() {
class Local {
val state = <!UNRESOLVED_REFERENCE!>outerState<!>
val state = outerState
}
}
}
@@ -5,8 +5,8 @@ class Outer {
val property = ""
class Nested {
fun f() = <!UNRESOLVED_REFERENCE!>function<!>()
fun g() = <!UNRESOLVED_REFERENCE!>property<!>
fun f() = function()
fun g() = property
fun h() = this@Outer.function()
fun i() = this@Outer.property
}
@@ -4,6 +4,6 @@ open class Base {
class Derived : Base() {
class Nested {
fun bar() = <!UNRESOLVED_REFERENCE!>foo<!>()
fun bar() = foo()
}
}
@@ -2,7 +2,7 @@
// KT-5362 Compiler crashes on access to extension method from nested class
class Outer {
class Nested{
fun foo(s: String) = s.<!UNRESOLVED_REFERENCE!>extension<!>()
fun foo(s: String) = s.extension()
}
private fun String.extension(): String = this
@@ -29,8 +29,8 @@ open class A<T> : J() {
fun test() {
foo()
bar()
val a: Int = <!UNRESOLVED_REFERENCE!>baz<!>()
val b: T = <!UNRESOLVED_REFERENCE!>baz<!>()
val a: Int = baz()
val b: T = baz()
}
}
@@ -29,8 +29,8 @@ open class A<T> : J() {
fun test() {
foo()
bar()
val a: Int = <!UNRESOLVED_REFERENCE!>baz<!>()
val b: T = <!UNRESOLVED_REFERENCE!>baz<!>()
val a: Int = baz()
val b: T = baz()
}
}
@@ -14,20 +14,20 @@ class A {
init {
foo()
bar()
<!UNRESOLVED_REFERENCE!>baz<!>()
baz()
}
fun test1() {
foo()
bar()
<!UNRESOLVED_REFERENCE!>baz<!>()
baz()
}
object O {
fun test() {
foo()
bar()
<!UNRESOLVED_REFERENCE!>baz<!>()
baz()
}
}
@@ -14,20 +14,20 @@ class A {
init {
foo()
bar()
<!UNRESOLVED_REFERENCE!>baz<!>()
baz()
}
fun test1() {
foo()
bar()
<!UNRESOLVED_REFERENCE!>baz<!>()
baz()
}
object O {
fun test() {
foo()
bar()
<!UNRESOLVED_REFERENCE!>baz<!>()
baz()
}
}