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

Commit 65aa266

Browse files
committed
引数のnull化対応
1 parent 1e017b2 commit 65aa266

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/com/mapk/core/KFunctionForCall.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class KFunctionForCall<T> internal constructor(
2222
parameterNameConverter: ParameterNameConverter,
2323
instance: Any? = null
2424
) {
25-
constructor(function: KFunction<T>, parameterNameConverter: (String) -> String, instance: Any? = null) : this(
25+
constructor(function: KFunction<T>, parameterNameConverter: ((String) -> String)?, instance: Any? = null) : this(
2626
function,
2727
ParameterNameConverter.Simple(parameterNameConverter),
2828
instance
@@ -108,7 +108,7 @@ internal fun <T : Any> KClass<T>.toKConstructor(parameterNameConverter: Paramete
108108
}
109109

110110
@Suppress("UNCHECKED_CAST")
111-
fun <T : Any> KClass<T>.toKConstructor(parameterNameConverter: (String) -> String): KFunctionForCall<T> =
111+
fun <T : Any> KClass<T>.toKConstructor(parameterNameConverter: ((String) -> String)?): KFunctionForCall<T> =
112112
this.toKConstructor(ParameterNameConverter.Simple(parameterNameConverter))
113113

114114
private fun KParameter.toArgumentBinder(parameterNameConverter: ParameterNameConverter): ArgumentBinder {

0 commit comments

Comments
 (0)