Refactoring & clarification: implement new FIR tower resolver
This commit is contained in:
@@ -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<!>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user