https://kotlinlang.org logo
#arrow-meta
Title
# arrow-meta
k

Krzysiek Zgondek

12/17/2020, 2:47 PM
Hi, i would like to know if I can obtain constructor declaration from KtUserType or is this even possible. Same question for obtaining type information for every object contained in 'typeParameter' provided by namedFunction scope?
Basically what I am trying to achieve is to read type constructor provided by call to some generic function, and create that object based on type provided to this function call. This of course requires me to go down the recursive path of reading types of constructor parameters and to create them too
r

raulraja

12/17/2020, 3:46 PM
There is a prototype here https://github.com/arrow-kt/arrow-meta/pull/679 other than that there is no way to get type info in that phase. Alternatively you can do this in the backend IR phase
k

Krzysiek Zgondek

12/17/2020, 3:57 PM
Thanks! I guess you're talking about this? https://meta.arrow-kt.io/apidocs/compiler-plugin/arrow.meta.dsl.codegen.ir/-ir-syntax/ If so could you provide me with an link where to start with this ?
2 Views