From 05c5a8f20167b652f918e8260fd16453efadf5ff Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Mon, 27 Feb 2017 19:17:15 +0300 Subject: Render functional type in parenthesis when it in receiver position --- core/src/main/kotlin/Kotlin/KotlinLanguageService.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'core/src/main') diff --git a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt index e54772b3..f33c8c96 100644 --- a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt +++ b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt @@ -414,7 +414,15 @@ class KotlinLanguageService : LanguageService { if (signatureMapper != null) { signatureMapper.renderReceiver(receiver, this) } else { - renderType(receiver.detail(NodeKind.Type), renderMode) + val type = receiver.detail(NodeKind.Type) + + if (type.isFunctionalType()) { + symbol("(") + renderFunctionalType(type, renderMode) + symbol(")") + } else { + renderType(type, renderMode) + } } symbol(".") } -- cgit