Do backend-IR lambdas need to be declared differen...
# compiler
a
Do backend-IR lambdas need to be declared differently in Kotlin 2.2.20? I getting platform-declaration-clash errors e.g:
Copy code
Platform declaration clash: The following declarations have the same JVM signature (xrSqlQueryModelTokenImpl$lambda$0$0(Lio/exoquery/SqliteDialect;Lio/exoquery/sql/SqlQueryModel;)Lio/exoquery/sql/Token;):
    fun `xrSqlQueryModelTokenImpl$lambda$0$0`(`this$0`: SqliteDialect, `$this_with`: SqlQueryModel): Token defined in io.exoquery.SqliteDialect
    fun `xrSqlQueryModelTokenImpl$lambda$0$0`(`this$0`: SqliteDialect, `$this_with`: SqlQueryModel): Token defined in io.exoquery.SqliteDialect
This goes away when in my
buildFun
call I replace
IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA
with
IrDeclarationOrigin.LOCAL_FUNCTION
. Have the lambda-naming rules changed in 2.2.20?
Also, changing the origin to
IrDeclarationOrigin.SYNTHETIC_JAVA_PROPERTY_DELEGATE
or
IrDeclarationOrigin.PROPERTY_DELEGATE
seems to fix the problem as well.
n
I’m running into the same issue. Did you find an answer to your question? What is the suggested solution?
a
Good call! I worked around the issue by switching to
IrDeclarationOrigin.LOCAL_FUNCTION
but that doesn't work in all cases (e.g. if you need to have suspended or inline lambdas).
n
I also switched to use
IrDeclarationOrigin.LOCAL_FUNCTION
, at least for now. It feels hackish, though.
I created a separate issue: KT-81253
👍 1