[FIR] Add PLATFORM_CLASS_MAPPED_TO_KOTLIN
This commit is contained in:
committed by
TeamCityServer
parent
51b73bb6ae
commit
f046f2964b
@@ -1,4 +1,5 @@
|
||||
// !CHECK_TYPE
|
||||
// WITH_EXTENDED_CHECKERS
|
||||
//KT-1778 Automatically cast error
|
||||
package kt1778
|
||||
|
||||
@@ -6,7 +7,7 @@ import checkSubtype
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
val x = checkSubtype<Any>(args[0])
|
||||
if(x is java.lang.CharSequence) {
|
||||
if(x is <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>java.lang.CharSequence<!>) {
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>"a" == x<!>) x.<!FUNCTION_CALL_EXPECTED!>length<!> else x.length() // OK
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>"a" == x<!> || <!EQUALITY_NOT_APPLICABLE!>"b" == x<!>) x.<!FUNCTION_CALL_EXPECTED!>length<!> else x.length() // <– THEN ERROR
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>"a" == x<!> && <!EQUALITY_NOT_APPLICABLE!>"a" == x<!>) x.<!FUNCTION_CALL_EXPECTED!>length<!> else x.length() // <– ELSE ERROR
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !CHECK_TYPE
|
||||
// WITH_EXTENDED_CHECKERS
|
||||
//KT-1778 Automatically cast error
|
||||
package kt1778
|
||||
|
||||
|
||||
Reference in New Issue
Block a user