Minor: formatting and warnings

This commit is contained in:
Nikolay Krasko
2014-01-17 17:23:40 +04:00
parent 7546a6dc41
commit 9a6ac60a5f
4 changed files with 8 additions and 11 deletions
@@ -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;
}
@@ -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();
@@ -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 {
@@ -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;
}