Andrey V
10/30/2024, 8:10 PMfindMethod(T::class, "copy")?.callBy(updateMap)
. How much complexity would there be to use KSP to synthesize some [data class].copy(Map<String, Any?>)
that constructs the args based on key presence somewhat like data class's synthesized copy()
?
it would be determined at runtime whether unrecognized keys are ignored or throw an exception
Edit 1: there's some recursion involved in that if data class C1
has a property of type data class C2
then the map synthetic copy is invoked for that property but the general idea is unchangedDaniel Pitts
11/01/2024, 4:20 PMAndrey V
11/17/2024, 12:21 AM