Gleb Minaev
01/31/2025, 12:14 AMFirDeclarationGenerationExtension
(that cannot change existing functions nor run diagnostics as far as I know).bnorm
01/31/2025, 12:38 PMFirStatusTransformerExtension
. If you need to change the signature in FIR, the best you can achieve is make the original function private and generate another function which should be used instead. But that doesn't change the calling code, so it really depends on your specific use-case.
For checks you'll need FirAdditionalCheckersExtension
.
Completely changing the signature is supported in IR though. You'll just need to make sure every IrCall
to the function is updated as well.Gleb Minaev
01/31/2025, 12:53 PMfun <S, @Supplied T, @Supplied U, V> myCoolFunction(arg1: Type1, arg2: Type2): ReturnType
to make it look like
fun <S, @Supplied T, @Supplied U, V> myCoolFunction(arg1: Type1, arg2: Type2, suppliedTypeForT: SuppliedType<T>, suppliedTypeForU: SuppliedType<U>): ReturnType
Anyway, thank you very much!