In FIR, I would like to copy function with a bit m...
# compiler
g
In FIR, I would like to copy function with a bit modified signature but the same return type. So I generate a new function via `createTopLevelFunction`/`createMemberFunction`. But this
create*Function
function requires a return type that should be resolved (as said in FIR plugins doc). And the original function that I would like to copy has expression body which type is not resolved only after the phase the new function is generated. So I get
Unexpected returnTypeRef. Expected is FirResolvedTypeRef, but was FirImplicitTypeRefImplWithoutSource
. Is it possible to work around it?
d
No, it isn't. All declarations created by plugins should have their types resolved.
thank you color 1