This repository was archived by the owner on Jan 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/kotlin/com/mapk/kmapper Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import com.mapk.core.KFunctionWithInstance
66import com.mapk.core.ValueParameter
77import com.mapk.core.getAnnotatedFunctions
88import com.mapk.core.getAnnotatedFunctionsFromCompanionObject
9+ import com.mapk.core.getKClass
910import kotlin.reflect.KClass
1011import kotlin.reflect.KFunction
1112import kotlin.reflect.full.findAnnotation
@@ -22,7 +23,7 @@ private fun <T> Collection<KFunction<T>>.getConvertersFromFunctions(): Set<Pair<
2223 .map { func ->
2324 func.isAccessible = true
2425
25- ( func.parameters.single().type.classifier as KClass < * > ) to func
26+ func.parameters.single().getKClass( ) to func
2627 }.toSet()
2728}
2829
@@ -43,7 +44,7 @@ private fun <T : Any> convertersFromCompanionObject(clazz: KClass<T>): Set<Pair<
4344 functions.map { function ->
4445 val func: KFunction <T > = KFunctionWithInstance (function, instance) as KFunction <T >
4546
46- ( func.parameters.single().type.classifier as KClass < * > ) to func
47+ func.parameters.single().getKClass( ) to func
4748 }.toSet()
4849 } ? : emptySet()
4950}
You can’t perform that action at this time.
0 commit comments