[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:
committed by
Space Team
parent
927d244682
commit
0c00e79024
@@ -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
|
||||
"".a()
|
||||
|
||||
@@ -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<!>()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ a: (kotlin.String) -> kotlin.Unit): kotlin.Unit
|
||||
public fun foo(/*0*/ a: @kotlin.ExtensionFunctionType A): kotlin.Unit
|
||||
public fun foo(/*0*/ a: @AliasedEFT /* = kotlin.ExtensionFunctionType */ A): kotlin.Unit
|
||||
|
||||
public interface A : (kotlin.String) -> kotlin.Unit {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -9,3 +9,5 @@ public interface A : (kotlin.String) -> kotlin.Unit {
|
||||
public abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: kotlin.String): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
public typealias AliasedEFT = kotlin.ExtensionFunctionType
|
||||
|
||||
|
||||
Reference in New Issue
Block a user