Presentation: Fix NPE on star projection rendering
EA-100480 Fixed
This commit is contained in:
@@ -97,9 +97,11 @@ class KotlinElementDescriptionProvider : ElementDescriptionProvider {
|
|||||||
return buildString {
|
return buildString {
|
||||||
append(type.referencedName ?: "???")
|
append(type.referencedName ?: "???")
|
||||||
|
|
||||||
val arguments = type.typeArgumentsAsTypes
|
val arguments = type.typeArguments
|
||||||
if (arguments.isNotEmpty()) {
|
if (arguments.isNotEmpty()) {
|
||||||
arguments.joinTo(this, prefix = "<", postfix = ">") { it.accept(visitor, data) }
|
arguments.joinTo(this, prefix = "<", postfix = ">") {
|
||||||
|
it.typeReference?.accept(visitor, data) ?: it.text
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
class A<T, U, V>
|
||||||
|
|
||||||
|
fun <caret>foo(a: A<Int, *, String>) {}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
Crumbs:
|
||||||
|
foo()
|
||||||
|
Tooltips:
|
||||||
|
function <b><code>foo(A<Int, *, String>)</code></b>
|
||||||
@@ -96,6 +96,12 @@ public class BreadcrumbsTestGenerated extends AbstractBreadcrumbsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("StarProjection.kt")
|
||||||
|
public void testStarProjection() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/StarProjection.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("Try.kt")
|
@TestMetadata("Try.kt")
|
||||||
public void testTry() throws Exception {
|
public void testTry() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/Try.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/Try.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user