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

Commit c5c9adb

Browse files
committed
スコープ関数内でitを使ってなかったため修正
1 parent 54f4927 commit c5c9adb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ sealed class FastKFunction<T> {
160160
method.parameters.size != parameters.size ->
161161
instance
162162
?.let {
163-
val generator = BucketGenerator(parameters, instance)
163+
val generator = BucketGenerator(parameters, it)
164164
val valueParameters = parameters.subList(1, parameters.size)
165165

166-
TopLevelExtensionFunction(function, method, instance, generator, valueParameters)
166+
TopLevelExtensionFunction(function, method, it, generator, valueParameters)
167167
} ?: Function(function, parameters)
168168
// トップレベル関数
169169
else -> TopLevelFunction(function, method, parameters)
@@ -186,9 +186,8 @@ sealed class FastKFunction<T> {
186186
InstanceFunction(function, method, instance, generator, valueParameters)
187187
} else {
188188
instance
189-
?.let {
190-
InstanceFunction(function, method, instance, BucketGenerator(parameters, null), parameters)
191-
} ?: Function(function, parameters)
189+
?.let { InstanceFunction(function, method, it, BucketGenerator(parameters, null), parameters) }
190+
?: Function(function, parameters)
192191
}
193192
}
194193

0 commit comments

Comments
 (0)