Check separately auto casts for nullable types.

It's necessary for functions with generics: constraint system ignores nullability divergence,
the error checks are made afterwards, the auto cast check should be made similarly.
This commit is contained in:
Svetlana Isakova
2013-12-09 14:17:36 +04:00
parent f271cb3609
commit 4b89c22ba7
4 changed files with 54 additions and 3 deletions
@@ -0,0 +1,7 @@
fun test(a: Any?) {
if (a != null) {
<!DEBUG_INFO_AUTOCAST!>a<!>.foo(11)
}
}
fun <T> Any.foo(t: T) = t