diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtTypeReference.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/KtTypeReference.kt index 63edcf068a1..e1c044726a2 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtTypeReference.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtTypeReference.kt @@ -39,7 +39,7 @@ class KtTypeReference : KtModifierListOwnerStub()?.isPlaceholder == true + get() = ((typeElement as? KtUserType)?.referenceExpression as? KtNameReferenceExpression)?.isPlaceholder == true val typeElement: KtTypeElement? get() = KtStubbedPsiUtil.getStubOrPsiChild(this, KtStubElementTypes.TYPE_ELEMENT_TYPES, KtTypeElement.ARRAY_FACTORY) diff --git a/compiler/testData/diagnostics/tests/inference/underscoredTypeInForbiddenPositions.kt b/compiler/testData/diagnostics/tests/inference/underscoredTypeInForbiddenPositions.kt index 81f3c920e61..6c95e93e220 100644 --- a/compiler/testData/diagnostics/tests/inference/underscoredTypeInForbiddenPositions.kt +++ b/compiler/testData/diagnostics/tests/inference/underscoredTypeInForbiddenPositions.kt @@ -31,9 +31,9 @@ class AA2 : Foo< bar(): Foo<_> = TODO() fun test() { - val x1 = foo Unit> { { it } } + val x1 = foo_) -> Unit> { { it } } val x2 = foo _> { { it } } - val x3 = foo _> { { it } } + val x3 = foo_)) -> _> { { it } } val x4 = foo<Int, _ -> Float> { { it } } val x5 = foo_) -> Float>> { { it } } val x6 = foo_) -> _>> { { it } }