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

Commit 72c8a6a

Browse files
committed
パラメータが空だった場合に落ちる問題の修正
1 parent f696b6f commit 72c8a6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ sealed class SingleArgFastKFunction<T> {
5757
companion object {
5858
@TestOnly
5959
internal fun List<KParameter>.checkParameters() = also {
60-
val requireInstanceParameter = this[0].kind != KParameter.Kind.VALUE
60+
val requireInstanceParameter = !isEmpty() && this[0].kind != KParameter.Kind.VALUE
6161

6262
if (isEmpty() || (requireInstanceParameter && size == 1))
6363
throw IllegalArgumentException("This function is not require arguments.")

0 commit comments

Comments
 (0)