k

    Krzysiek Zgondek

    1 year ago
    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
    raulraja

    raulraja

    1 year ago
    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

    1 year ago
    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 ?