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

[K2] KMP: Classes with expect/actual are missing parameters in signature #3381

Closed
atyrin opened this issue Nov 27, 2023 · 2 comments · Fixed by #3622
Closed

[K2] KMP: Classes with expect/actual are missing parameters in signature #3381

atyrin opened this issue Nov 27, 2023 · 2 comments · Fixed by #3622
Assignees
Labels
bug topic: K2 Issues / PRs that are related to the K2 migration. See #2888 upstream bug An issue that appears due to an upstream dependency bug, such as kotlin-compiler

Comments

@atyrin
Copy link
Contributor

atyrin commented Nov 27, 2023

// commonMain
expect class InheritMe(param: String)

// platoform
actual class InheritMe(param: String)

The parameters from the primary constructor are visible only in Constructors block. And missed in class signature (comparing to K1)


K1
image

K2
image

Installation

  • Dokka version: 1.9.20

Parent: #3328

@atyrin atyrin added bug topic: K2 Issues / PRs that are related to the K2 migration. See #2888 labels Nov 27, 2023
@vmishenev vmishenev changed the title [K2] Classes with expect/actual are missing parameters in signature [K2] KMP: Classes with expect/actual are missing parameters in signature Dec 4, 2023
@vmishenev
Copy link
Member

vmishenev commented Dec 14, 2023

It is blocked by https://youtrack.jetbrains.com/issue/KT-64344/Analysis-API-a-primary-constructor-is-missed-in-an-expect-class

Note: Is actual class InheritMe(param: String) compilable?
I get the error Declaration must be marked with 'actual'.
IDE transforms it to actual class InheritMe actual constructor(param: String)

@vmishenev vmishenev added the upstream bug An issue that appears due to an upstream dependency bug, such as kotlin-compiler label Dec 14, 2023
@whyoleg
Copy link
Collaborator

whyoleg commented May 20, 2024

Not reproducible at my side on current master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug topic: K2 Issues / PRs that are related to the K2 migration. See #2888 upstream bug An issue that appears due to an upstream dependency bug, such as kotlin-compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants