From 44a607abe3d4c9a59420687f24b92a43c99f41b8 Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Tue, 13 Oct 2015 18:13:51 +0300 Subject: [PATCH] Error on 'if' without an 'else' branch when used as an expression Original commit: e14c9645dc0936e014b228d700c9b52dbf72faec --- .../src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt index 5aceafc6d9e..6282478f645 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt @@ -320,7 +320,9 @@ public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR val compilerServices = Services.Builder() .register(javaClass(), IncrementalCompilationComponentsImpl(incrementalCaches, lookupTracker)) .register(javaClass(), object : CompilationCanceledStatus { - override fun checkCanceled(): Unit = if (context.getCancelStatus().isCanceled()) throw CompilationCanceledException() + override fun checkCanceled() { + if (context.getCancelStatus().isCanceled()) throw CompilationCanceledException() + } }) .build()