Presentation: Fix NPE on functional type rendering

#KT-17638 Fixed
This commit is contained in:
Alexey Sedunov
2017-05-16 18:17:01 +03:00
parent a80fb6f20f
commit 0994474e87
4 changed files with 13 additions and 0 deletions
@@ -103,6 +103,8 @@ class KotlinElementDescriptionProvider : ElementDescriptionProvider {
}
}
}
override fun visitParameter(parameter: KtParameter, data: Unit) = parameter.typeReference?.accept(this, data) ?: "???"
},
Unit
)
@@ -0,0 +1 @@
fun <caret>test(f: (Int) -> Int) {}
@@ -0,0 +1,4 @@
Crumbs:
test()
Tooltips:
function <b><code>test((Int) -&gt; Int)</code></b>
@@ -54,6 +54,12 @@ public class BreadcrumbsTestGenerated extends AbstractBreadcrumbsTest {
doTest(fileName);
}
@TestMetadata("FunctionalType.kt")
public void testFunctionalType() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/FunctionalType.kt");
doTest(fileName);
}
@TestMetadata("If.kt")
public void testIf() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/If.kt");