[NI] Fix type intersection for equal types

This commit is contained in:
Mikhail Zarechenskiy
2017-07-03 10:48:20 +03:00
parent ac507e721c
commit cf75afba66
6 changed files with 62 additions and 5 deletions
@@ -0,0 +1,18 @@
// WITH_RUNTIME
// FILE: test.kt
fun foo() {
takeClass(run {
val outer: Sample<out Any>? = null
if (outer != null) outer else null
})
}
fun takeClass(instanceClass: Sample<*>?) {}
class Sample<T : Any>
fun box(): String {
foo()
return "OK"
}