FIR checker: check TOPLEVEL_TYPEALIASES_ONLY

This commit is contained in:
Tianyu Geng
2021-03-23 18:29:00 -07:00
committed by Mikhail Glukhikh
parent 6ca005cd70
commit 6769ce0e2b
12 changed files with 63 additions and 25 deletions
@@ -9,7 +9,7 @@ typealias TTNullableTString = TNullableTString
fun f3() = TTNullableTString::class
inline fun <reified T> f4(b: Boolean): Any {
typealias X = T
typealias Y = T?
<!TOPLEVEL_TYPEALIASES_ONLY!>typealias X = T<!>
<!TOPLEVEL_TYPEALIASES_ONLY!>typealias Y = T?<!>
return if (b) <!UNRESOLVED_REFERENCE!>X<!>::class else <!UNRESOLVED_REFERENCE!>Y<!>::class
}
@@ -1,19 +0,0 @@
typealias TopLevel = Any
interface A {
typealias Nested = Any
}
class C {
typealias Nested = Any
class D {
typealias Nested = Any
fun foo() {
typealias LocalInMember = Any
}
}
}
fun foo() {
typealias Local = Any
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
typealias TopLevel = Any
interface A {