Added tests
#KT-6179 Fixed #KT-8132 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// KT-8132 Can't omit lambda parameter types
|
||||
|
||||
fun <T> test(foo: List<T>): T {
|
||||
return if (true)
|
||||
throw IllegalStateException()
|
||||
else
|
||||
foo.reduce { left, right -> left } // error: inferred type T is not subtype Nothing
|
||||
}
|
||||
|
||||
fun <S, T: S> Iterable<T>.reduce(operation: (S, T) -> S): S = throw Exception()
|
||||
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
internal fun </*0*/ T> test(/*0*/ foo: kotlin.List<T>): T
|
||||
internal fun </*0*/ S, /*1*/ T : S> kotlin.Iterable<T>.reduce(/*0*/ operation: (S, T) -> S): S
|
||||
Reference in New Issue
Block a user