[FIR & IR] Support of default values for arguments in expect functions

Add FirActualDeclarationChecker that checks expect/actual return types

^KT-56331 Fixed, ^KT-56334 Fixed
This commit is contained in:
Ivan Kochurkin
2023-02-16 21:22:03 +01:00
committed by Space Team
parent a54b56d74e
commit d87619e06e
64 changed files with 819 additions and 705 deletions
@@ -62,9 +62,36 @@ FILE: anonymousObjectInInvalidPosition.kt
}
EXPECT_ACTUAL_MATCHING:
FILE: anonymousObjectInInvalidPosition.kt
private final [EXPECT_ACTUAL_MATCHING] val resolveMe: <ERROR TYPE REF: Wrong number of type arguments> = ERROR_EXPR(Should have initializer)Null(null) = object : A<Int> {
private [RAW_FIR] [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
super<<implicit>>()
}
public? open? override [RAW_FIR] fun x(): R|kotlin/Unit| {
}
}
private [EXPECT_ACTUAL_MATCHING] get(): <ERROR TYPE REF: Wrong number of type arguments>
public? final? [RAW_FIR] interface A<[RAW_FIR] T> : R|kotlin/Any| {
public? final? [RAW_FIR] fun x(): R|kotlin/Unit|
}
ARGUMENTS_OF_ANNOTATIONS:
FILE: anonymousObjectInInvalidPosition.kt
private final [ARGUMENTS_OF_ANNOTATIONS] val resolveMe: <ERROR TYPE REF: Wrong number of type arguments> = LAZY_EXPRESSION
private final [ARGUMENTS_OF_ANNOTATIONS] val resolveMe: <ERROR TYPE REF: Wrong number of type arguments> = ERROR_EXPR(Should have initializer)Null(null) = object : A<Int> {
private [RAW_FIR] [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
super<<implicit>>()
}
public? open? override [RAW_FIR] fun x(): R|kotlin/Unit| {
}
}
private [ARGUMENTS_OF_ANNOTATIONS] get(): <ERROR TYPE REF: Wrong number of type arguments>
public? final? [RAW_FIR] interface A<[RAW_FIR] T> : R|kotlin/Any| {
public? final? [RAW_FIR] fun x(): R|kotlin/Unit|
@@ -125,24 +152,6 @@ FILE: anonymousObjectInInvalidPosition.kt
}
EXPECT_ACTUAL_MATCHING:
FILE: anonymousObjectInInvalidPosition.kt
private final [EXPECT_ACTUAL_MATCHING] val resolveMe: <ERROR TYPE REF: Wrong number of type arguments> = ERROR_EXPR(Should have initializer)Null(null) = object : A<Int> {
private [RAW_FIR] [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
super<<implicit>>()
}
public? open? override [RAW_FIR] fun x(): R|kotlin/Unit| {
}
}
private [EXPECT_ACTUAL_MATCHING] get(): <ERROR TYPE REF: Wrong number of type arguments>
public? final? [RAW_FIR] interface A<[RAW_FIR] T> : R|kotlin/Any| {
public? final? [RAW_FIR] fun x(): R|kotlin/Unit|
}
BODY_RESOLVE:
FILE: anonymousObjectInInvalidPosition.kt
private final [BODY_RESOLVE] val resolveMe: <ERROR TYPE REF: Wrong number of type arguments> = ERROR_EXPR(Should have initializer)Null(null) = object : R|A<kotlin/Int>| {