Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 3378ae6

Browse files
committed
フォーマッティング
1 parent 87aa5a4 commit 3378ae6

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

src/main/kotlin/com/mapk/fastkfunction/FastKFunction.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ import com.mapk.fastkfunction.spreadwrapper.ForMethod
88
import org.jetbrains.annotations.TestOnly
99
import java.lang.reflect.Method
1010
import java.lang.reflect.Modifier
11-
import kotlin.reflect.KClass
1211
import kotlin.reflect.KFunction
1312
import kotlin.reflect.KParameter
14-
import kotlin.reflect.full.isSuperclassOf
1513
import kotlin.reflect.jvm.isAccessible
1614
import kotlin.reflect.jvm.javaConstructor
1715
import kotlin.reflect.jvm.javaMethod

src/main/kotlin/com/mapk/fastkfunction/SingleArgFastKFunction.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import java.lang.reflect.Method
55
import java.lang.reflect.Modifier
66
import kotlin.reflect.KFunction
77
import kotlin.reflect.KParameter
8-
import kotlin.reflect.full.isSuperclassOf
98
import kotlin.reflect.jvm.isAccessible
109
import kotlin.reflect.jvm.javaConstructor
1110
import kotlin.reflect.jvm.javaMethod
@@ -81,7 +80,9 @@ sealed class SingleArgFastKFunction<T> {
8180
parameters[0].kind == KParameter.Kind.EXTENSION_RECEIVER -> {
8281
// 対象が拡張関数ならinstanceはreceiver、指定が無ければエラー
8382
TopLevelExtensionFunction(
84-
parameters[1], method, instance.instanceOrThrow(KParameter.Kind.EXTENSION_RECEIVER)
83+
parameters[1],
84+
method,
85+
instance.instanceOrThrow(KParameter.Kind.EXTENSION_RECEIVER)
8586
)
8687
}
8788
// javaMethodのパラメータサイズとKFunctionのパラメータサイズが違う場合も拡張関数

src/test/kotlin/com/mapk/fastkfunction/SingleArgFastKFunctionTest.kt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ private class SingleArgFastKFunctionTest {
164164
fun isCorrect() {
165165
val result = assertDoesNotThrow {
166166
SingleArgFastKFunction.instanceFunctionOf(
167-
function, this@InstanceFunctionOfTest, parameters, javaMethod
167+
function,
168+
this@InstanceFunctionOfTest,
169+
parameters,
170+
javaMethod
168171
)
169172
}
170173
assertTrue(result is SingleArgFastKFunction.InstanceFunction)
@@ -181,7 +184,10 @@ private class SingleArgFastKFunctionTest {
181184
fun withoutInstance() {
182185
val result = assertDoesNotThrow {
183186
SingleArgFastKFunction.instanceFunctionOf(
184-
function, null, parameters, javaMethod
187+
function,
188+
null,
189+
parameters,
190+
javaMethod
185191
)
186192
}
187193
assertTrue(result is SingleArgFastKFunction.Function)
@@ -198,7 +204,10 @@ private class SingleArgFastKFunctionTest {
198204
fun withCorrectInstance() {
199205
val result = assertDoesNotThrow {
200206
SingleArgFastKFunction.instanceFunctionOf(
201-
function, this@InstanceFunctionOfTest, parameters, javaMethod
207+
function,
208+
this@InstanceFunctionOfTest,
209+
parameters,
210+
javaMethod
202211
)
203212
}
204213
assertTrue(result is SingleArgFastKFunction.InstanceFunction)

0 commit comments

Comments
 (0)