Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Indication as a parameter in extension function doesn't compile on iOS #3086

Closed
MikolajKakol opened this issue Apr 22, 2023 · 4 comments
Assignees
Labels
bug Something isn't working compiler Compiler plugin related reproduced

Comments

@MikolajKakol
Copy link

MikolajKakol commented Apr 22, 2023

Describe the bug
Given code should compile

fun Modifier.foo(
    indication: Indication?,
): Modifier {
    return this
}

But if fails with

Unbound public symbol IrSimpleFunctionPublicSymbolImpl: androidx.compose.foundation/Indication.rememberUpdatedInstance|132472734405641894[0]

Affected platforms
Select one of the platforms below:

  • iOS

Versions

  • Kotlin version*: 1.8.20
  • Compose Multiplatform version*: 1.4.0 and 1.5.0-dev1030
  • OS version(s)* (required for Desktop and iOS issues): 16.2
  • OS architecture (x86 or arm64): x86

Related: #3087

@MikolajKakol MikolajKakol added bug Something isn't working submitted labels Apr 22, 2023
@eymar eymar added compiler Compiler plugin related reproduced and removed submitted labels Apr 24, 2023
@eymar
Copy link
Member

eymar commented May 22, 2023

The workaround is to add @HiddenFromObjC annotation:

@OptIn(ExperimentalObjCRefinement::class)
@HiddenFromObjC
fun Modifier.foo(
    indication: Indication?,
): Modifier {
    return this
}

A proper fix is in progress.

@eymar
Copy link
Member

eymar commented Jun 28, 2023

Hi @MikolajKakol ! please give 1.4.1 a try, it was built with kotlin 1.8.20 and with new fixes in the compiler plugin, so this should work without workarounds:

fun Modifier.foo(
    indication: Indication?,
): Modifier {
    return this
}

@igordmn
Copy link
Collaborator

igordmn commented Jul 26, 2023

Fixed in 1.4.3

@igordmn igordmn closed this as completed Jul 26, 2023
@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler Compiler plugin related reproduced
Projects
None yet
Development

No branches or pull requests

5 participants