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

[KSP2] Unable to get visibility of KSTypeAlias #2140

Closed
FooIbar opened this issue Oct 9, 2024 · 0 comments · Fixed by #2152
Closed

[KSP2] Unable to get visibility of KSTypeAlias #2140

FooIbar opened this issue Oct 9, 2024 · 0 comments · Fixed by #2152
Assignees
Labels
P1 major features or blocking bugs

Comments

@FooIbar
Copy link

FooIbar commented Oct 9, 2024

KSDeclaration.getVisibility() calls KSDeclaration.modifiers, which is not implemented for KSTypeAlias.

override val modifiers: Set<Modifier> by lazy {
if (origin == Origin.JAVA_LIB || origin == Origin.KOTLIN_LIB || origin == Origin.SYNTHETIC) {
when (ktDeclarationSymbol) {
is KaPropertySymbol -> ktDeclarationSymbol.toModifiers()
is KaClassSymbol -> ktDeclarationSymbol.toModifiers()
is KaFunctionSymbol -> ktDeclarationSymbol.toModifiers()
is KaJavaFieldSymbol -> ktDeclarationSymbol.toModifiers()
else -> throw IllegalStateException("Unexpected symbol type ${ktDeclarationSymbol.javaClass}")
}

@ting-yuan ting-yuan self-assigned this Oct 9, 2024
@ting-yuan ting-yuan added the P1 major features or blocking bugs label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 major features or blocking bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants