Cleanup: val can be parameter
This commit is contained in:
@@ -249,7 +249,7 @@ class NumberCompare(
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ObjectCompare(
|
class ObjectCompare(
|
||||||
val opToken: IElementType,
|
opToken: IElementType,
|
||||||
operandType: Type,
|
operandType: Type,
|
||||||
left: StackValue,
|
left: StackValue,
|
||||||
right: StackValue
|
right: StackValue
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class MultifileClassPartCodegen(
|
|||||||
private val packageFragment: PackageFragmentDescriptor,
|
private val packageFragment: PackageFragmentDescriptor,
|
||||||
private val superClassInternalName: String,
|
private val superClassInternalName: String,
|
||||||
private val shouldGeneratePartHierarchy: Boolean,
|
private val shouldGeneratePartHierarchy: Boolean,
|
||||||
private val partContext: MultifileClassPartContext,
|
partContext: MultifileClassPartContext,
|
||||||
state: GenerationState
|
state: GenerationState
|
||||||
) : MemberCodegen<KtFile>(state, null, partContext, file, v) {
|
) : MemberCodegen<KtFile>(state, null, partContext, file, v) {
|
||||||
private val partType = partContext.filePartType
|
private val partType = partContext.filePartType
|
||||||
|
|||||||
@@ -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) {
|
override fun putSelector(type: Type, v: InstructionAdapter) {
|
||||||
lambda(v)
|
lambda(v)
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.script.KotlinScriptDefinitionProvider
|
|||||||
import org.jetbrains.kotlin.utils.toReadOnlyList
|
import org.jetbrains.kotlin.utils.toReadOnlyList
|
||||||
|
|
||||||
class LazyScriptClassMemberScope(
|
class LazyScriptClassMemberScope(
|
||||||
private val resolveSession: ResolveSession,
|
resolveSession: ResolveSession,
|
||||||
declarationProvider: ClassMemberDeclarationProvider,
|
declarationProvider: ClassMemberDeclarationProvider,
|
||||||
private val scriptDescriptor: LazyScriptDescriptor,
|
private val scriptDescriptor: LazyScriptDescriptor,
|
||||||
trace: BindingTrace)
|
trace: BindingTrace)
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.script.ScriptPriorities
|
|||||||
import org.jetbrains.kotlin.types.TypeSubstitutor
|
import org.jetbrains.kotlin.types.TypeSubstitutor
|
||||||
|
|
||||||
class LazyScriptDescriptor(
|
class LazyScriptDescriptor(
|
||||||
private val resolveSession: ResolveSession,
|
resolveSession: ResolveSession,
|
||||||
containingDeclaration: DeclarationDescriptor,
|
containingDeclaration: DeclarationDescriptor,
|
||||||
name: Name,
|
name: Name,
|
||||||
internal val scriptInfo: KtScriptInfo
|
internal val scriptInfo: KtScriptInfo
|
||||||
|
|||||||
+1
-1
@@ -87,7 +87,7 @@ abstract class AbstractInvokeTowerProcessor<F : Candidate<FunctionDescriptor>, V
|
|||||||
// todo KT-9522 Allow invoke convention for synthetic property
|
// todo KT-9522 Allow invoke convention for synthetic property
|
||||||
class InvokeTowerProcessor<F : Candidate<FunctionDescriptor>, V : Candidate<VariableDescriptor>>(
|
class InvokeTowerProcessor<F : Candidate<FunctionDescriptor>, V : Candidate<VariableDescriptor>>(
|
||||||
invokeContext: InvokeTowerContext<F, V>,
|
invokeContext: InvokeTowerContext<F, V>,
|
||||||
private val explicitReceiver: Receiver?
|
explicitReceiver: Receiver?
|
||||||
) : AbstractInvokeTowerProcessor<F, V>(
|
) : AbstractInvokeTowerProcessor<F, V>(
|
||||||
invokeContext,
|
invokeContext,
|
||||||
createVariableProcessor(invokeContext.contextForVariable(stripExplicitReceiver = false), explicitReceiver)
|
createVariableProcessor(invokeContext.contextForVariable(stripExplicitReceiver = false), explicitReceiver)
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ internal open class ScopeBasedTowerLevel protected constructor(
|
|||||||
}
|
}
|
||||||
internal class ImportingScopeBasedTowerLevel(
|
internal class ImportingScopeBasedTowerLevel(
|
||||||
scopeTower: ScopeTower,
|
scopeTower: ScopeTower,
|
||||||
private val importingScope: ImportingScope
|
importingScope: ImportingScope
|
||||||
): ScopeBasedTowerLevel(scopeTower, importingScope)
|
): ScopeBasedTowerLevel(scopeTower, importingScope)
|
||||||
|
|
||||||
internal class SyntheticScopeBasedTowerLevel(
|
internal class SyntheticScopeBasedTowerLevel(
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ import org.jetbrains.kotlin.utils.toReadOnlyList
|
|||||||
|
|
||||||
class JvmPackageScope(
|
class JvmPackageScope(
|
||||||
private val c: LazyJavaResolverContext,
|
private val c: LazyJavaResolverContext,
|
||||||
private val jPackage: JavaPackage,
|
jPackage: JavaPackage,
|
||||||
private val packageFragment: LazyJavaPackageFragment
|
private val packageFragment: LazyJavaPackageFragment
|
||||||
): MemberScope {
|
): MemberScope {
|
||||||
internal val javaScope = LazyJavaPackageScope(c, jPackage, packageFragment)
|
internal val javaScope = LazyJavaPackageScope(c, jPackage, packageFragment)
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ import org.jetbrains.kotlin.utils.toReadOnlyList
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class LazyJavaClassDescriptor(
|
class LazyJavaClassDescriptor(
|
||||||
private val outerContext: LazyJavaResolverContext,
|
outerContext: LazyJavaResolverContext,
|
||||||
containingDeclaration: DeclarationDescriptor,
|
containingDeclaration: DeclarationDescriptor,
|
||||||
private val jClass: JavaClass,
|
private val jClass: JavaClass,
|
||||||
private val additionalSupertypeClassDescriptor: ClassDescriptor? = null
|
private val additionalSupertypeClassDescriptor: ClassDescriptor? = null
|
||||||
|
|||||||
+3
-3
@@ -25,9 +25,9 @@ import org.jetbrains.kotlin.name.Name
|
|||||||
import org.jetbrains.kotlin.types.Variance
|
import org.jetbrains.kotlin.types.Variance
|
||||||
|
|
||||||
class FunctionInvokeDescriptor private constructor(
|
class FunctionInvokeDescriptor private constructor(
|
||||||
private val container: DeclarationDescriptor,
|
container: DeclarationDescriptor,
|
||||||
private val original: FunctionInvokeDescriptor?,
|
original: FunctionInvokeDescriptor?,
|
||||||
private val callableKind: CallableMemberDescriptor.Kind
|
callableKind: CallableMemberDescriptor.Kind
|
||||||
) : SimpleFunctionDescriptorImpl(
|
) : SimpleFunctionDescriptorImpl(
|
||||||
container,
|
container,
|
||||||
original,
|
original,
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ fun createClassStub(
|
|||||||
private class ClassClsStubBuilder(
|
private class ClassClsStubBuilder(
|
||||||
private val parentStub: StubElement<out PsiElement>,
|
private val parentStub: StubElement<out PsiElement>,
|
||||||
private val classProto: ProtoBuf.Class,
|
private val classProto: ProtoBuf.Class,
|
||||||
private val nameResolver: NameResolver,
|
nameResolver: NameResolver,
|
||||||
private val classId: ClassId,
|
private val classId: ClassId,
|
||||||
source: SourceElement?,
|
source: SourceElement?,
|
||||||
outerContext: ClsStubBuilderContext
|
outerContext: ClsStubBuilderContext
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ import org.jetbrains.kotlin.name.Name
|
|||||||
|
|
||||||
class DelegatedPropertyFieldDescriptor(
|
class DelegatedPropertyFieldDescriptor(
|
||||||
project: Project,
|
project: Project,
|
||||||
val objectRef: ObjectReference,
|
objectRef: ObjectReference,
|
||||||
val delegate: Field,
|
val delegate: Field,
|
||||||
val renderDelegatedProperty: Boolean
|
val renderDelegatedProperty: Boolean
|
||||||
) : FieldDescriptorImpl(project, objectRef, delegate) {
|
) : FieldDescriptorImpl(project, objectRef, delegate) {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getAssignmentByLHS
|
|||||||
import org.jetbrains.kotlin.psi.psiUtil.nonStaticOuterClasses
|
import org.jetbrains.kotlin.psi.psiUtil.nonStaticOuterClasses
|
||||||
|
|
||||||
class MakeConstructorParameterPropertyFix(
|
class MakeConstructorParameterPropertyFix(
|
||||||
element: KtParameter, private val kotlinValVar: KotlinValVar, private val className: String?
|
element: KtParameter, private val kotlinValVar: KotlinValVar, className: String?
|
||||||
) : KotlinQuickFixAction<KtParameter>(element) {
|
) : KotlinQuickFixAction<KtParameter>(element) {
|
||||||
override fun getFamilyName() = "Make primary constructor parameter a property"
|
override fun getFamilyName() = "Make primary constructor parameter a property"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ import com.intellij.usageView.UsageInfo
|
|||||||
class KotlinWrapperForJavaUsageInfos(
|
class KotlinWrapperForJavaUsageInfos(
|
||||||
val javaChangeInfo: JavaChangeInfo,
|
val javaChangeInfo: JavaChangeInfo,
|
||||||
val javaUsageInfos: Array<UsageInfo>,
|
val javaUsageInfos: Array<UsageInfo>,
|
||||||
val primaryMethod: PsiElement
|
primaryMethod: PsiElement
|
||||||
): UsageInfo(primaryMethod) {
|
): UsageInfo(primaryMethod) {
|
||||||
override fun hashCode() = javaChangeInfo.method.hashCode()
|
override fun hashCode() = javaChangeInfo.method.hashCode()
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -42,8 +42,8 @@ import org.jetbrains.kotlin.types.KotlinType
|
|||||||
|
|
||||||
class KotlinVariableInplaceIntroducer(
|
class KotlinVariableInplaceIntroducer(
|
||||||
val addedVariable: KtProperty,
|
val addedVariable: KtProperty,
|
||||||
val originalExpression: KtExpression?,
|
originalExpression: KtExpression?,
|
||||||
val occurrencesToReplace: Array<KtExpression>,
|
occurrencesToReplace: Array<KtExpression>,
|
||||||
suggestedNames: Collection<String>,
|
suggestedNames: Collection<String>,
|
||||||
val isVar: Boolean,
|
val isVar: Boolean,
|
||||||
val doNotChangeVar: Boolean,
|
val doNotChangeVar: Boolean,
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ import java.awt.BorderLayout
|
|||||||
import javax.swing.*
|
import javax.swing.*
|
||||||
|
|
||||||
internal class KotlinSelectNestedClassRefactoringDialog private constructor (
|
internal class KotlinSelectNestedClassRefactoringDialog private constructor (
|
||||||
private val project: Project,
|
project: Project,
|
||||||
private val nestedClass: KtClassOrObject,
|
private val nestedClass: KtClassOrObject,
|
||||||
private val targetContainer: PsiElement?
|
private val targetContainer: PsiElement?
|
||||||
) : DialogWrapper(project, true) {
|
) : DialogWrapper(project, true) {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import org.jetbrains.kotlin.psi.*
|
|||||||
|
|
||||||
class KotlinPullUpDialog(
|
class KotlinPullUpDialog(
|
||||||
project: Project,
|
project: Project,
|
||||||
private val classOrObject: KtClassOrObject,
|
classOrObject: KtClassOrObject,
|
||||||
superClasses: List<PsiNamedElement>,
|
superClasses: List<PsiNamedElement>,
|
||||||
memberInfoStorage: KotlinMemberInfoStorage
|
memberInfoStorage: KotlinMemberInfoStorage
|
||||||
) : KotlinPullUpDialogBase(
|
) : KotlinPullUpDialogBase(
|
||||||
|
|||||||
Reference in New Issue
Block a user