[FIR] Support typealiases in FirTypeAnnotationChecker

`directExpansionType` is needed here for cases like
`typealias S = @S Suppress`. Otherwise, `fullyExpandedType`
would cache the same typealias
This commit is contained in:
Nikolay Lunyak
2023-01-10 11:44:11 +02:00
committed by Space Team
parent 927d244682
commit 0c00e79024
7 changed files with 65 additions and 50 deletions
@@ -5,8 +5,9 @@ fun foo(a: (String) -> Unit) {
interface A : (String) -> Unit {}
typealias AliasedEFT = ExtensionFunctionType
fun foo(a: <!WRONG_EXTENSION_FUNCTION_TYPE_WARNING!>@ExtensionFunctionType<!> A) {
fun foo(a: <!WRONG_EXTENSION_FUNCTION_TYPE_WARNING!>@AliasedEFT<!> A) {
// @Extension annotation on an unrelated type shouldn't have any effect on this diagnostic.
// Only kotlin.Function{n} type annotated with @Extension should
"".<!UNRESOLVED_REFERENCE!>a<!>()