Add a constraint for nested call

if there are no bounds on variables in this call return type
This commit is contained in:
Svetlana Isakova
2015-06-27 17:19:20 +03:00
parent 1463ff7258
commit 179c5e3c3a
5 changed files with 60 additions and 11 deletions
@@ -8,5 +8,5 @@ fun <T, C: Collection<T>> convert(src: Collection<T>, dest: C): C = throw Except
fun test(l: List<Int>) {
//todo should be inferred
val r = convert(l, HashSet())
checkSubtype<Collection<Int>>(r)
r checkType { _<HashSet<Int>>() }
}