Hi everyone! I created a PR <https://github.com/ar...
# arrow-contributors
h
Hi everyone! I created a PR https://github.com/arrow-kt/arrow-core/pull/129 to add
filterIsInstance
and
traverseFilterIsInstance
but I have a problem •
arrow-meta
cannot handle
java.lang.Class
correctly. It generates
import kotlin.Class
which doesn't exist! I tried to add
.replace("java.lang.Class", "")
in
fun String.asKotlin(): String
but it didn't solve the problem! Also in
fun TypeName.Classy.asKotlin(): TypeName.Classy
there is a condition for
Iterable
but didn't work with
Class
! • Also I tried with
kotlin.reflect.KClass<T : Any>
but
arrow-meta
cannot handle the
T : Any
part! Any suggestion to solve it?
I have a plan to fix it in another PR. IMHO the problem is where we separate the
simpleName
from the
packageName
and apply
asKotlin
method on each of them. They both must be deduced from canonical name and
asKotlin
just applies on canonical name(aka qualified name). If there's not any other suggestion, I'll start tonight.