Minor: remove inner type alias from gradle test
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
class Curry<T, R>(private val f: FN2, private val arg1: T) {
|
typealias FN2<T, R> = (T, T) -> R
|
||||||
typealias FN2 = (T, T) -> R
|
|
||||||
|
|
||||||
|
class Curry<T, R>(private val f: FN2<T, R>, private val arg1: T) {
|
||||||
operator fun invoke(arg2: T): R =
|
operator fun invoke(arg2: T): R =
|
||||||
f(arg1, arg2)
|
f(arg1, arg2)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ class UseCurry {
|
|||||||
if (plus1(1) != 2) throw AssertionError()
|
if (plus1(1) != 2) throw AssertionError()
|
||||||
}
|
}
|
||||||
|
|
||||||
private object Plus : Curry<Int, Int>.FN2 {
|
private object Plus : FN2<Int, Int> {
|
||||||
override fun invoke(p0: Int, p1: Int): Int =
|
override fun invoke(p0: Int, p1: Int): Int =
|
||||||
p0 + p1
|
p0 + p1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user