From 9a6ac60a5ffbb2e8d04a7109e6cbe0621a1712a9 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Fri, 17 Jan 2014 17:23:40 +0400 Subject: [PATCH] Minor: formatting and warnings --- .../src/org/jetbrains/jet/codegen/ClassBodyCodegen.java | 5 ++--- .../org/jetbrains/jet/codegen/binding/CodegenBinding.java | 8 +++----- .../cli/jvm/compiler/CliLightClassGenerationSupport.java | 4 ++-- .../asJava/KotlinLightClassForExplicitDeclaration.java | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/ClassBodyCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/ClassBodyCodegen.java index dc9b29acd4a..be75149b092 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/ClassBodyCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/ClassBodyCodegen.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2013 JetBrains s.r.o. + * Copyright 2010-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -116,8 +116,7 @@ public abstract class ClassBodyCodegen extends MemberCodegen { genFunctionOrProperty(context, (JetTypeParameterListOwner) declaration, v); } else if (declaration instanceof JetClassOrObject) { - if (declaration instanceof JetEnumEntry && !enumEntryNeedSubclass( - state.getBindingContext(), (JetEnumEntry) declaration)) { + if (declaration instanceof JetEnumEntry && !enumEntryNeedSubclass(state.getBindingContext(), (JetEnumEntry) declaration)) { return; } diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/binding/CodegenBinding.java b/compiler/backend/src/org/jetbrains/jet/codegen/binding/CodegenBinding.java index 2bfcfe11545..24f7ddcafca 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/binding/CodegenBinding.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/binding/CodegenBinding.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2013 JetBrains s.r.o. + * Copyright 2010-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -324,10 +324,7 @@ public class CodegenBinding { return closure != null && closure.getCaptureThis() != null; } - private static JetDelegatorToSuperCall findSuperCall( - BindingContext bindingContext, - JetElement classOrObject - ) { + private static JetDelegatorToSuperCall findSuperCall(BindingContext bindingContext, JetElement classOrObject) { if (!(classOrObject instanceof JetClassOrObject)) { return null; } @@ -335,6 +332,7 @@ public class CodegenBinding { if (classOrObject instanceof JetClass && ((JetClass) classOrObject).isTrait()) { return null; } + for (JetDelegationSpecifier specifier : ((JetClassOrObject) classOrObject).getDelegationSpecifiers()) { if (specifier instanceof JetDelegatorToSuperCall) { JetTypeReference typeReference = specifier.getTypeReference(); diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CliLightClassGenerationSupport.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CliLightClassGenerationSupport.java index bbe6a69caaa..b242b1beded 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CliLightClassGenerationSupport.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CliLightClassGenerationSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2013 JetBrains s.r.o. + * Copyright 2010-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -209,7 +209,7 @@ public class CliLightClassGenerationSupport extends LightClassGenerationSupport @Nullable @Override public PsiClass getPsiClass(@NotNull JetClassOrObject classOrObject) { - return KotlinLightClassForExplicitDeclaration.create(classOrObject.getManager(), classOrObject); + return KotlinLightClassForExplicitDeclaration.create(classOrObject.getManager(), classOrObject); } public static class BindingTraceContextWithoutScopeRecording extends BindingTraceContext { diff --git a/compiler/jet.as.java.psi/src/org/jetbrains/jet/asJava/KotlinLightClassForExplicitDeclaration.java b/compiler/jet.as.java.psi/src/org/jetbrains/jet/asJava/KotlinLightClassForExplicitDeclaration.java index a608c22d6ae..d3acb619558 100644 --- a/compiler/jet.as.java.psi/src/org/jetbrains/jet/asJava/KotlinLightClassForExplicitDeclaration.java +++ b/compiler/jet.as.java.psi/src/org/jetbrains/jet/asJava/KotlinLightClassForExplicitDeclaration.java @@ -387,7 +387,7 @@ public class KotlinLightClassForExplicitDeclaration extends KotlinWrappingLightC @Override public PsiModifierList getModifierList() { if (modifierList == null) { - modifierList = new KotlinLightModifierList(KotlinLightClassForExplicitDeclaration.this.computeModifiers()); + modifierList = new KotlinLightModifierList(computeModifiers()); } return modifierList; }