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
KotlinReflectionInternalError when a kotlin.time.Duration parameter has a default value #237
Comments
I'm not sure what we can do if the bug is in the compiler. |
For now, at least this issue documents the case, so that people catching the error can find out what's going on without incurring extra research effort. I'm not sure about a solution either. Maybe we can just live with it for now. Or someone comes up with a bright idea. Maybe something like a wrapper or a delegate would do? |
Hoplite supports a "poor man's" value class if you have a data class with a
single parameter called "value".
…On Tue, 16 Nov 2021 at 06:49, OliverO2 ***@***.***> wrote:
For now, at least this issue documents the case, so that people catching
the error can find out what's going on without incurring extra research
effort.
I'm not sure about a solution either. Maybe we can just live with it for
now. Or someone comes up with a bright idea. Maybe something like a wrapper
or a delegate would do?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#237 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGUW7LFUQBUN3AWFJ2TUMJHOTANCNFSM5ID6Y5TQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Good to know! With an extra level of indirection in Kotlin code, configurations can benefit from This change...
...makes the above example print:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
While this issue has a workaround, it's still very much current and will be until the compiler bug is fixed. |
The required compiler fix is included in Kotlin builds build-1.7.0-Beta-3 and above, so can be expected to land in Kotlin 1.7. |
Cool, thanks for letting me know.
…On Thu, Apr 14, 2022, 7:09 AM OliverO2 ***@***.***> wrote:
The required compiler fix is included in Kotlin builds build-1.7.0-Beta-3
<https://github.com/JetBrains/kotlin/releases/tag/build-1.7.0-Beta-3> and
above, so can be expected to land in Kotlin 1.7.
—
Reply to this email directly, view it on GitHub
<#237 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGXR53CC6BBXPZ74PMTVFADIBANCNFSM5ID6Y5TQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
...as well as letting me know ;-). Ideally, such stuff could be automated, so that we could get a reminder once the Kotlin fix is released. But I am not aware of such an option. |
The fix has been released in Kotlin 1.7.0. Changing the |
Closing as confirmed fixed in 1.7.x |
Cause:
Duration
is an inline class (avalue
class annotated with@JvmInline
). There is a known bug KT-27598, causing the error when a constructor with inline class parameters is called via reflection.Versions used:
Source:
Build script modifications:
Exception produced:
The text was updated successfully, but these errors were encountered: