Skip to content

Kotlin: fix doc comment extraction for local functions #10268

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

Merged
merged 4 commits into from
Sep 5, 2022

Conversation

tamasvajk
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the Kotlin label Sep 2, 2022
@tamasvajk tamasvajk marked this pull request as ready for review September 2, 2022 12:23
@tamasvajk tamasvajk requested review from a team as code owners September 2, 2022 12:23
} else if (ownerIr is IrFunction && ownerIr.isLocalFunction()) {
label = "local function ${ownerIr.name.asString()}"
fileExtractor.getLocallyVisibleFunctionLabels(ownerIr).function
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused by this, and the IrVariable case above. Can't we move them in to getLabel?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

getLabel returns the string representation of a label. In case of a local function or a variable, we don't have a meaningful unique string name, only *. Let me do a small refactoring to pull these special cases to a properly named function to ease readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See bb5f0d4.

@igfoo igfoo merged commit b38ad13 into github:main Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants