Skip to content

asKaType

context(session: KaSession)
fun PsiType.asKaType(useSitePosition: PsiElement): KaType?

Converts the given PsiType to a KaType in the context of the useSitePosition.

useSitePosition clarifies how to resolve some parts of the PsiType. For instance, it can be used to collect type parameters and apply them during the conversion.

Receiver

The PsiType to be converted.

Return

The converted KaType, or null if conversion is not possible. For example, PsiType might not be resolvable.