[AA LC] Create proper Psi types for types with errors inside
This commit is contained in:
committed by
Space Team
parent
3a536bb32f
commit
a3b9f15ecc
+1
-1
@@ -30,7 +30,7 @@ abstract class AbstractAnalysisApiExpressionPsiTypeProviderTest : AbstractAnalys
|
||||
val actual = analyze(ktFile) {
|
||||
val returnType = declarationAtCaret.getKtType()
|
||||
?: error("Not a typable expression ${declarationAtCaret::class} ${declarationAtCaret.text}")
|
||||
val psiType = returnType.asPsiType(psiContext)
|
||||
val psiType = returnType.asPsiType(psiContext, allowErrorTypes = false)
|
||||
buildString {
|
||||
appendLine("KtType: ${returnType.render(position = Variance.INVARIANT)}")
|
||||
appendLine("PsiType: $psiType")
|
||||
|
||||
+2
-2
@@ -39,11 +39,11 @@ abstract class AbstractAnalysisApiPsiTypeProviderTest : AbstractAnalysisApiBased
|
||||
analyze(declaration) {
|
||||
val ktType = declaration.getReturnKtType()
|
||||
appendLine("KtType: ${ktType.render(position = Variance.INVARIANT)}")
|
||||
appendLine("PsiType: ${ktType.asPsiType(psiContext)}")
|
||||
appendLine("PsiType: ${ktType.asPsiType(psiContext, allowErrorTypes = false)}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
testServices.assertions.assertEqualsToTestDataFileSibling(actual)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user