-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Generate: val -> const val #42
Comments
If I remember correctly, expect/actual cannot be used with |
I'm going to close this for now. |
@yshrsmz you can expose expect/actual const values with using |
Hi @Prototik, thanks for the great information. Do you know any source about this? I found this youtrack issue, but it does not clarify if this is a bug or not |
No, I don't have any additional information about this, i discovered it by myself via looking to source code of kotlin compiler. I think this inspection just don't care about expect/actuals and should not be forced on expect declrations (due to fact expect cannot have default implementation of any sort). I personally used it in my own BuildConfig-like plugin for a couple years already and don't encounter any issues with this suppress, and i think it's generally safe to do that (at least with opt-in behavior as I suggested in #70). |
@yshrsmz I found this: it allows const actuals for non-const expects |
That's great! |
@Prototik I just noticed that the latest preview of Kotlin v2 and compose-multiplatform seems to have some issues with |
Hi, maybe you can use const for generated config objects? Otherwise, you will not be able to make other constants. Constants will allow you to discard chunks of test code that should not be build for a production code.
The text was updated successfully, but these errors were encountered: