KT-668 Failed to resolve generic parameter

Same lower and upper bounds cause an equality constraint to be created
This commit is contained in:
Andrey Breslav
2011-11-30 12:56:11 +03:00
parent 5293d1553b
commit 7fd7bdb2b8
2 changed files with 57 additions and 20 deletions
@@ -0,0 +1,14 @@
// KT-668 Failed to resolve generic parameter
open class A()
open class B() : A() {
fun b(): B = B()
}
class C() {
fun a<T>(x: fun(T):T, y: T): T {
return x(x(y))
}
val x: B = a({it.b()}, B())
}