[FIR] Fix case with lazy resolve in expect-actual annotation checker
Unresolved annotation arguments were treated as absent arguments, which lead to false-positive reports. Add assert and test for that and fix. MR: KT-MR-12245 ^KT-60671 Fixed
This commit is contained in:
committed by
Space Team
parent
4c75fb108f
commit
0fd700de21
+3
-1
@@ -544,6 +544,8 @@ internal abstract class IrExpectActualMatchingContext(
|
||||
override fun TypeRefMarker.getClassId(): ClassId? = (this as IrType).getClass()?.classId
|
||||
|
||||
override fun checkAnnotationsOnTypeRefAndArguments(
|
||||
expectContainingSymbol: DeclarationSymbolMarker,
|
||||
actualContainingSymbol: DeclarationSymbolMarker,
|
||||
expectTypeRef: TypeRefMarker,
|
||||
actualTypeRef: TypeRefMarker,
|
||||
checker: ExpectActualMatchingContext.AnnotationsCheckerCallback
|
||||
@@ -560,7 +562,7 @@ internal abstract class IrExpectActualMatchingContext(
|
||||
for ((expectArg, actualArg) in expectTypeRef.arguments.zip(actualTypeRef.arguments)) {
|
||||
val expectArgType = expectArg.typeOrNull ?: continue
|
||||
val actualArgType = actualArg.typeOrNull ?: continue
|
||||
checkAnnotationsOnTypeRefAndArguments(expectArgType, actualArgType, checker)
|
||||
checkAnnotationsOnTypeRefAndArguments(expectContainingSymbol, actualContainingSymbol, expectArgType, actualArgType, checker)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user