diff --git a/compiler/testData/diagnostics/tests/j+k/kt2641.kt b/compiler/testData/diagnostics/tests/j+k/kt2641.kt index c25e107c899..02679e02348 100644 --- a/compiler/testData/diagnostics/tests/j+k/kt2641.kt +++ b/compiler/testData/diagnostics/tests/j+k/kt2641.kt @@ -1,11 +1,16 @@ -//KT-2641 Warn on using j.l.Iterable in Kotlin code -package n +package a import java.util.Iterator import java.lang.Comparable as Comp -fun bar() : java.lang.Iterable? { - val a : java.lang.Comparable? = null - val b : Iterable<Integer> +fun bar(any: Any): java.lang.Iterable? { + val a: java.lang.Comparable? = null + val b: Iterable<Integer> + val c : Iterator? = null + + if (any is Iterator<*>) { + any : Iterator<*> + } + any as Iterator<*> return null } \ No newline at end of file