I tried to initialize a property, though CodeBlock#of throws an IllegalArgumentException in CodeBlock#argToType
I looked into the root cause of the error which was at CodeBlock#argToType.
Even if o
is a ClassName(which also is a TypeName) it does not pass the is TypeName -> o
check and throws the IllegalArguementException.
val initString = "mutableMapOf(Pair(%T, %T), Pair(%T, %T))"
val initArgs = arraysOf(...)
CodeBlock.of(initString, initArgs)
I expected the CodeBlock to be built correctly, but instead it throws the IllegalArguementException