[FIR] Disallow bare types for nested type arguments
Detect missing WRONG_NUMBER_OF_TYPE_ARGUMENTS
This commit is contained in:
committed by
TeamCityServer
parent
21026cc704
commit
d4a11fc295
@@ -1,10 +0,0 @@
|
||||
interface Tr
|
||||
interface G<T>
|
||||
|
||||
fun test(tr: Tr): Any {
|
||||
return tr as G<G>
|
||||
}
|
||||
|
||||
fun test1(tr: Tr): Any {
|
||||
return tr as G.(G) -> G
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
interface Tr
|
||||
interface G<T>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ public fun foo(a: Any) {
|
||||
a is Map<out Any?, Any?>
|
||||
a is Map<*, *>
|
||||
a is Map<<!SYNTAX!><!>>
|
||||
a is List<Map>
|
||||
a is List<<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Map<!>>
|
||||
a is <!NO_TYPE_ARGUMENTS_ON_RHS!>List<!>
|
||||
a is Int
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ public fun foo(a: Any, b: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Map<!>) {
|
||||
is Map<out Any?, Any?> -> {}
|
||||
is Map<*, *> -> {}
|
||||
is Map<<!SYNTAX!><!>> -> {}
|
||||
is List<Map> -> {}
|
||||
is List<<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Map<!>> -> {}
|
||||
is <!NO_TYPE_ARGUMENTS_ON_RHS!>List<!> -> {}
|
||||
is Int -> {}
|
||||
else -> {}
|
||||
|
||||
Reference in New Issue
Block a user