Fix false warning about useless cast in property and property accessor
Note that there are some other problems, for example: `val a = if (true) 1 as Number else 2`, here we'll get useless cast #KT-9551 Fixed #KT-9645 Fixed
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
class G<T>
|
||||
|
||||
fun foo(p: <!UNRESOLVED_REFERENCE!>P<!>) {
|
||||
val v = <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>p<!> <!USELESS_CAST!>as <!NO_TYPE_ARGUMENTS_ON_RHS!>G?<!><!>
|
||||
val v = <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>p<!> as <!NO_TYPE_ARGUMENTS_ON_RHS!>G?<!>
|
||||
checkSubtype<G<*>>(v!!)
|
||||
}
|
||||
Reference in New Issue
Block a user