CAST_NEVER_SUCCEED: replace subtyping check with subclassing check #KT-13206 Fixed
(cherry picked from commit 5fc797a)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
17c824f7f2
commit
a902c4901a
@@ -3,6 +3,6 @@ package h
|
||||
public class MyClass<S, T>(<!UNUSED_PARAMETER!>param<!>: MyClass<S, T>) {
|
||||
fun test() {
|
||||
val result: MyClass<Any, Any>? = null
|
||||
MyClass<S, Any>(result <!CAST_NEVER_SUCCEEDS!>as<!> MyClass<S, Any>)
|
||||
MyClass<S, Any>(<!UNCHECKED_CAST!>result as MyClass<S, Any><!>)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user