Retain data flow info after binary calls

Make autocasts in CandidateResolver when checking value argument types

 #KT-2825 In Progress
This commit is contained in:
Alexander Udalov
2012-11-12 17:37:05 +04:00
parent a71ea5c6db
commit 1fbe9b9a31
6 changed files with 131 additions and 34 deletions
@@ -0,0 +1,16 @@
trait A
trait B : A
fun B.plus(b: B) = if (this == b) b else this
fun foo(a: A): B {
val result = (a as B) + a
a : B
return result
}
fun bar(a: A, b: B): B {
val result = b + (a as B)
a : B
return result
}