Cleanup: val can be parameter

This commit is contained in:
Mikhail Glukhikh
2016-05-18 18:21:14 +03:00
parent b86fb64008
commit ebd57fafd7
17 changed files with 20 additions and 20 deletions

View File

@@ -249,7 +249,7 @@ class NumberCompare(
}
class ObjectCompare(
val opToken: IElementType,
opToken: IElementType,
operandType: Type,
left: StackValue,
right: StackValue

View File

@@ -46,7 +46,7 @@ class MultifileClassPartCodegen(
private val packageFragment: PackageFragmentDescriptor,
private val superClassInternalName: String,
private val shouldGeneratePartHierarchy: Boolean,
private val partContext: MultifileClassPartContext,
partContext: MultifileClassPartContext,
state: GenerationState
) : MemberCodegen<KtFile>(state, null, partContext, file, v) {
private val partType = partContext.filePartType

View File

@@ -59,7 +59,7 @@ class StackValueWithLeaveTask(
}
}
open class OperationStackValue(val resultType: Type, val lambda: (v: InstructionAdapter) -> Unit) : StackValue(resultType) {
open class OperationStackValue(resultType: Type, val lambda: (v: InstructionAdapter) -> Unit) : StackValue(resultType) {
override fun putSelector(type: Type, v: InstructionAdapter) {
lambda(v)

View File

@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.script.KotlinScriptDefinitionProvider
import org.jetbrains.kotlin.utils.toReadOnlyList
class LazyScriptClassMemberScope(
private val resolveSession: ResolveSession,
resolveSession: ResolveSession,
declarationProvider: ClassMemberDeclarationProvider,
private val scriptDescriptor: LazyScriptDescriptor,
trace: BindingTrace)

View File

@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.script.ScriptPriorities
import org.jetbrains.kotlin.types.TypeSubstitutor
class LazyScriptDescriptor(
private val resolveSession: ResolveSession,
resolveSession: ResolveSession,
containingDeclaration: DeclarationDescriptor,
name: Name,
internal val scriptInfo: KtScriptInfo

View File

@@ -87,7 +87,7 @@ abstract class AbstractInvokeTowerProcessor<F : Candidate<FunctionDescriptor>, V
// todo KT-9522 Allow invoke convention for synthetic property
class InvokeTowerProcessor<F : Candidate<FunctionDescriptor>, V : Candidate<VariableDescriptor>>(
invokeContext: InvokeTowerContext<F, V>,
private val explicitReceiver: Receiver?
explicitReceiver: Receiver?
) : AbstractInvokeTowerProcessor<F, V>(
invokeContext,
createVariableProcessor(invokeContext.contextForVariable(stripExplicitReceiver = false), explicitReceiver)

View File

@@ -166,7 +166,7 @@ internal open class ScopeBasedTowerLevel protected constructor(
}
internal class ImportingScopeBasedTowerLevel(
scopeTower: ScopeTower,
private val importingScope: ImportingScope
importingScope: ImportingScope
): ScopeBasedTowerLevel(scopeTower, importingScope)
internal class SyntheticScopeBasedTowerLevel(

View File

@@ -35,7 +35,7 @@ import org.jetbrains.kotlin.utils.toReadOnlyList
class JvmPackageScope(
private val c: LazyJavaResolverContext,
private val jPackage: JavaPackage,
jPackage: JavaPackage,
private val packageFragment: LazyJavaPackageFragment
): MemberScope {
internal val javaScope = LazyJavaPackageScope(c, jPackage, packageFragment)

View File

@@ -50,7 +50,7 @@ import org.jetbrains.kotlin.utils.toReadOnlyList
import java.util.*
class LazyJavaClassDescriptor(
private val outerContext: LazyJavaResolverContext,
outerContext: LazyJavaResolverContext,
containingDeclaration: DeclarationDescriptor,
private val jClass: JavaClass,
private val additionalSupertypeClassDescriptor: ClassDescriptor? = null

View File

@@ -25,9 +25,9 @@ import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.Variance
class FunctionInvokeDescriptor private constructor(
private val container: DeclarationDescriptor,
private val original: FunctionInvokeDescriptor?,
private val callableKind: CallableMemberDescriptor.Kind
container: DeclarationDescriptor,
original: FunctionInvokeDescriptor?,
callableKind: CallableMemberDescriptor.Kind
) : SimpleFunctionDescriptorImpl(
container,
original,

View File

@@ -56,7 +56,7 @@ fun createClassStub(
private class ClassClsStubBuilder(
private val parentStub: StubElement<out PsiElement>,
private val classProto: ProtoBuf.Class,
private val nameResolver: NameResolver,
nameResolver: NameResolver,
private val classId: ClassId,
source: SourceElement?,
outerContext: ClsStubBuilderContext

View File

@@ -31,7 +31,7 @@ import org.jetbrains.kotlin.name.Name
class DelegatedPropertyFieldDescriptor(
project: Project,
val objectRef: ObjectReference,
objectRef: ObjectReference,
val delegate: Field,
val renderDelegatedProperty: Boolean
) : FieldDescriptorImpl(project, objectRef, delegate) {

View File

@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getAssignmentByLHS
import org.jetbrains.kotlin.psi.psiUtil.nonStaticOuterClasses
class MakeConstructorParameterPropertyFix(
element: KtParameter, private val kotlinValVar: KotlinValVar, private val className: String?
element: KtParameter, private val kotlinValVar: KotlinValVar, className: String?
) : KotlinQuickFixAction<KtParameter>(element) {
override fun getFamilyName() = "Make primary constructor parameter a property"

View File

@@ -23,7 +23,7 @@ import com.intellij.usageView.UsageInfo
class KotlinWrapperForJavaUsageInfos(
val javaChangeInfo: JavaChangeInfo,
val javaUsageInfos: Array<UsageInfo>,
val primaryMethod: PsiElement
primaryMethod: PsiElement
): UsageInfo(primaryMethod) {
override fun hashCode() = javaChangeInfo.method.hashCode()

View File

@@ -42,8 +42,8 @@ import org.jetbrains.kotlin.types.KotlinType
class KotlinVariableInplaceIntroducer(
val addedVariable: KtProperty,
val originalExpression: KtExpression?,
val occurrencesToReplace: Array<KtExpression>,
originalExpression: KtExpression?,
occurrencesToReplace: Array<KtExpression>,
suggestedNames: Collection<String>,
val isVar: Boolean,
val doNotChangeVar: Boolean,

View File

@@ -29,7 +29,7 @@ import java.awt.BorderLayout
import javax.swing.*
internal class KotlinSelectNestedClassRefactoringDialog private constructor (
private val project: Project,
project: Project,
private val nestedClass: KtClassOrObject,
private val targetContainer: PsiElement?
) : DialogWrapper(project, true) {

View File

@@ -34,7 +34,7 @@ import org.jetbrains.kotlin.psi.*
class KotlinPullUpDialog(
project: Project,
private val classOrObject: KtClassOrObject,
classOrObject: KtClassOrObject,
superClasses: List<PsiNamedElement>,
memberInfoStorage: KotlinMemberInfoStorage
) : KotlinPullUpDialogBase(