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

Compatibility with Kotlin 1.5.0-RC. Long vs Duration #2649

Closed
turansky opened this issue Apr 14, 2021 · 2 comments
Closed

Compatibility with Kotlin 1.5.0-RC. Long vs Duration #2649

turansky opened this issue Apr 14, 2021 · 2 comments
Labels

Comments

@turansky
Copy link
Contributor

turansky commented Apr 14, 2021

Current signatures:

public suspend fun <T> withTimeout(timeMillis: Long, block: suspend CoroutineScope.() -> T): T
public suspend fun <T> withTimeout(timeout: Duration, block: suspend CoroutineScope.() -> T): T

Method call with Long parameter works fine

Method call with Duration produce error:

java.lang.NoSuchMethodError: 'java.lang.Object kotlinx.coroutines.TimeoutKt.withTimeout-lwyi7ZQ(long, kotlin.jvm.functions.Function2, kotlin.coroutines.Continuation)'
@whyoleg
Copy link
Contributor

whyoleg commented Apr 14, 2021

expected: #2565 (comment)

But in that case, you had to get an experimentality warning: library authors shouldn't provide stable API that internally depends on experimental inline classes or other experimental API. If you didn't get the warning, I suggest filing an issue in the corresponding projecs.

It's experimental API :)

@qwwdfsad
Copy link
Collaborator

qwwdfsad commented Apr 19, 2021

We'll release version 1.5.0 right after the release of Kotlin 1.5.0.

Such incompatibilities is the reason these functions are experimental right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants