Minor: reformat
This commit is contained in:
+4
-4
@@ -24,15 +24,15 @@ public class LexicalScope(val parentScope: LexicalScope?, val element: JetElemen
|
||||
private val d = (parentScope?.depth ?: 0) + 1
|
||||
val depth: Int get() = d
|
||||
|
||||
val lexicalScopeForContainingDeclaration: LexicalScope? by lazy { computeLexicalScopeForContainingDeclaration() }
|
||||
private fun computeLexicalScopeForContainingDeclaration(): LexicalScope? {
|
||||
val lexicalScopeForContainingDeclaration: LexicalScope? by lazy {
|
||||
var scope: LexicalScope? = this
|
||||
while (scope != null) {
|
||||
if (scope.element is JetDeclaration) {
|
||||
return scope
|
||||
return@lazy scope
|
||||
}
|
||||
scope = scope.parentScope
|
||||
}
|
||||
return null
|
||||
|
||||
return@lazy null
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -27,8 +27,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public final class DiagnosticFactoryToRendererMap {
|
||||
private final Map<DiagnosticFactory<?>, DiagnosticRenderer<?>> map =
|
||||
new HashMap<DiagnosticFactory<?>, DiagnosticRenderer<?>>();
|
||||
private final Map<DiagnosticFactory<?>, DiagnosticRenderer<?>> map = new HashMap<DiagnosticFactory<?>, DiagnosticRenderer<?>>();
|
||||
private boolean immutable = false;
|
||||
|
||||
private void checkMutability() {
|
||||
|
||||
+5
-1
@@ -91,7 +91,11 @@ public open class KotlinLightClassForExplicitDeclaration(
|
||||
|
||||
var declaration: PsiElement? = JetPsiUtil.getTopmostParentOfTypes(
|
||||
classOrObject,
|
||||
javaClass<JetNamedFunction>(), javaClass<JetConstructor<*>>(), javaClass<JetProperty>(), javaClass<JetClassInitializer>(), javaClass<JetParameter>())
|
||||
JetNamedFunction::class.java,
|
||||
JetConstructor::class.java,
|
||||
JetProperty::class.java,
|
||||
JetClassInitializer::class.java,
|
||||
JetParameter::class.java)
|
||||
|
||||
if (declaration is JetParameter) {
|
||||
declaration = declaration.getStrictParentOfType<JetNamedDeclaration>()
|
||||
|
||||
@@ -362,9 +362,7 @@ public class LightClassUtil {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static PsiTypeParameterList buildLightTypeParameterList(
|
||||
PsiTypeParameterListOwner owner,
|
||||
JetDeclaration declaration) {
|
||||
public static PsiTypeParameterList buildLightTypeParameterList(PsiTypeParameterListOwner owner, JetDeclaration declaration) {
|
||||
LightTypeParameterListBuilder builder = new KotlinLightTypeParameterListBuilder(owner.getManager());
|
||||
if (declaration instanceof JetTypeParameterListOwner) {
|
||||
JetTypeParameterListOwner typeParameterListOwner = (JetTypeParameterListOwner) declaration;
|
||||
|
||||
@@ -25,18 +25,19 @@ import org.jetbrains.kotlin.rmi.kotlinr.KotlinCompilerClient
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.util.*
|
||||
|
||||
public class CompilerDaemonTest : KotlinIntegrationTestBase() {
|
||||
|
||||
data class CompilerResults(val resultCode: Int, val out: String)
|
||||
|
||||
val daemonOptions by lazy { DaemonOptions(runFilesPath = tmpdir.absolutePath) }
|
||||
val daemonJVMOptions by lazy { DaemonJVMOptions() }
|
||||
val compilerId by lazy { CompilerId.makeCompilerId( File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler.jar"),
|
||||
File("dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-runtime.jar"),
|
||||
File("dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-reflect.jar")) }
|
||||
val daemonOptions by lazy(LazyThreadSafetyMode.NONE) { DaemonOptions(runFilesPath = tmpdir.absolutePath) }
|
||||
val daemonJVMOptions by lazy(LazyThreadSafetyMode.NONE) { DaemonJVMOptions() }
|
||||
val compilerId by lazy(LazyThreadSafetyMode.NONE) {
|
||||
CompilerId.makeCompilerId(
|
||||
File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler.jar"),
|
||||
File("dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-runtime.jar"),
|
||||
File("dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-reflect.jar"))
|
||||
}
|
||||
|
||||
private fun compileOnDaemon(args: Array<out String>): CompilerResults {
|
||||
System.setProperty(COMPILE_DAEMON_VERBOSE_REPORT_PROPERTY, "")
|
||||
|
||||
Reference in New Issue
Block a user