Special diagnostics when no type arguments passed on teh right-hand side of 'is' expression
Example: if (a is Map) // ERROR: Say 'Map<*, *>' if you don't want to pass type arguments
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package p
|
||||
|
||||
public fun foo(a: Any) {
|
||||
a is Map<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><Int><!>
|
||||
a is <!NO_TYPE_ARGUMENTS_ON_RHS_OF_IS_EXPRESSION!>Map<!>
|
||||
a is Map<out Any?, Any?>
|
||||
a is Map<*, *>
|
||||
a is Map<<!SYNTAX!><!>>
|
||||
a is <!CANNOT_CHECK_FOR_ERASED!>List<<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Map<!>><!>
|
||||
a is <!NO_TYPE_ARGUMENTS_ON_RHS_OF_IS_EXPRESSION!>List<!>
|
||||
a is Int
|
||||
|
||||
(a <!USELESS_CAST!>as<!> <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Map<!>) is Int
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user