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

Fix merging of implicit expect/actual with a single declaration #4016

Conversation

vmishenev
Copy link
Contributor

@vmishenev vmishenev commented Jan 31, 2025

The main idea of this fix is that pages with implicit expect/actual declarations and a single declaration should have the same name since they are merged by PageMerger based on the page name. Before the fix, pages with the same DRI/path were unmerged, which caused an exception.

@vmishenev vmishenev marked this pull request as ready for review February 3, 2025 23:38
) {
pagesGenerationStage = { root ->
val cl = root.dfs { it.name == "Skiko" && it is ClasslikePageNode } ?: throw IllegalStateException()
assertEquals(2, cl.children.count { it.name == "[jvm]isShowing" })
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before the fix, there were 2 pages: [jvm]isShowing and isShowing with the different names, but the same DRI.

@vmishenev vmishenev requested a review from whyoleg February 4, 2025 12:59
Copy link
Collaborator

@whyoleg whyoleg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@vmishenev vmishenev merged commit d9d8423 into master Feb 5, 2025
11 checks passed
@vmishenev vmishenev deleted the vmishenev/3685-fix-merging-of-implicit-expect-actual-with-a-single-declaration branch February 5, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[K2] KMP: Multiple pages associated with key reported for an actual class overriding method from java parent
2 participants