Detect redundant 'is' check

#KT-14187 Fixed
This commit is contained in:
Dmitry Neverov
2017-05-01 08:27:25 +02:00
committed by Mikhail Zarechenskiy
parent 768e0fa738
commit cd24adac32
36 changed files with 123 additions and 76 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ interface B<T> : A<T>
fun <T> foo(b: A<T>) = b
fun <T> test(a: A<T>) {
if (a is Any) {
if (<!USELESS_IS_CHECK!>a is Any<!>) {
// Error:(9, 9) Kotlin: Type inference failed: fun <T> foo(b: A<T>): kotlin.Unit
// cannot be applied to (A<T>)
foo(a)