FIR checker: check if callable reference targets are allowed members
This commit is contained in:
committed by
Mikhail Glukhikh
parent
6769ce0e2b
commit
8d8ed4cc18
@@ -11,7 +11,7 @@ interface TypeConstructor
|
||||
|
||||
class Refiner {
|
||||
val memoizedFunctionLambda = createMemoizedFunction { it.foo() } // error type infered, no diagnostic, BAD, backend fails
|
||||
val memoizedFunctionReference = createMemoizedFunction(TypeConstructor::foo) // EXTENSION_IN_CLASS_REFERENCE_IS_NOT_ALLOWED, fine
|
||||
val memoizedFunctionReference = createMemoizedFunction(<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>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
|
||||
|
||||
Reference in New Issue
Block a user