Skip to content

expectedType

context(session: KaSession)
val PsiElement.expectedType: KaType?

The expected KaType for the given PsiElement if it is an expression, or null if the element does not have an expected type. The expected type represents the type that is expected for an expression at a specific location in the code.

See expressionType for a discussion about the expression type vs. the expected type.