Refactoring & clarification: implement new FIR tower resolver

This commit is contained in:
Mikhail Glukhikh
2020-01-10 18:58:42 +03:00
parent a3ab763f0b
commit 14204a842a
125 changed files with 1804 additions and 1085 deletions
@@ -11,7 +11,7 @@ interface TypeConstructor
class Refiner {
val memoizedFunctionLambda = createMemoizedFunction { it.<!INAPPLICABLE_CANDIDATE!>foo<!>() } // error type infered, no diagnostic, BAD, backend fails
val memoizedFunctionReference = createMemoizedFunction(TypeConstructor::foo) // EXTENSION_IN_CLASS_REFERENCE_IS_NOT_ALLOWED, fine
val memoizedFunctionReference = <!INAPPLICABLE_CANDIDATE!>createMemoizedFunction<!>(<!UNRESOLVED_REFERENCE!>TypeConstructor::foo<!>) // EXTENSION_IN_CLASS_REFERENCE_IS_NOT_ALLOWED, fine
val memoizedFunctionTypes = createMemoizedFunction<TypeConstructor, Boolean> { it.foo() } // works fine
private fun TypeConstructor.foo(): Boolean = true
@@ -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.extension()
fun foo(s: String) = s.<!UNRESOLVED_REFERENCE!>extension<!>()
}
private fun String.extension(): String = this
@@ -12,7 +12,7 @@ class Outer {
fun Activity.toast() = Unit
class Activity(){
class Fragment{
fun call() = toast()
fun call() = <!INAPPLICABLE_CANDIDATE!>toast<!>()
}
}