Make more generic signature for reduce and reduceRight methods.

Fixes #KT-2287
This commit is contained in:
Ilya Gorbunov
2015-04-10 20:27:34 +03:00
parent 08e92ac746
commit 043b27bfe5
3 changed files with 106 additions and 61 deletions
@@ -151,7 +151,7 @@ class CollectionTest {
// TODO replace with more accurate version when KT-5987 will be fixed
// failsWith(javaClass<UnsupportedOperationException>()) {
fails {
arrayListOf<Int>().reduce { a, b -> a + b }
run { arrayListOf<Int>().reduce { a, b -> a + b } }
}
}
@@ -164,7 +164,7 @@ class CollectionTest {
// TODO replace with more accurate version when KT-5987 will be fixed
// failsWith(javaClass<UnsupportedOperationException>()) {
fails {
arrayListOf<Int>().reduceRight { a, b -> a + b }
run { arrayListOf<Int>().reduceRight { a, b -> a + b } }
}
}