[FIR] Add check inline declaration inside constructor calls

#KT-59933
This commit is contained in:
Evgeniy.Zhelenskiy
2023-10-25 19:35:55 +02:00
committed by Space Team
parent 6a5b356d30
commit ce396f4ab6
3 changed files with 2 additions and 8 deletions
@@ -132,7 +132,7 @@ object FirInlineDeclarationChecker : FirFunctionChecker() {
reporter: DiagnosticReporter,
) {
if (context.isContractBody) return
val calledFunctionSymbol = targetSymbol as? FirNamedFunctionSymbol ?: return
val calledFunctionSymbol = targetSymbol as? FirFunctionSymbol ?: return
val argumentMapping = functionCall.resolvedArgumentMapping ?: return
for ((wrappedArgument, valueParameter) in argumentMapping) {
val argument = wrappedArgument.unwrapArgument()
@@ -1,7 +0,0 @@
class Z(s: (Int) -> Int) {
}
public inline fun test(s : (Int) -> Int) {
Z(s)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class Z(s: (Int) -> Int) {
}