IDEA: unnecessary 'val's removed from constructors
This commit is contained in:
+2
-2
@@ -58,8 +58,8 @@ private class ClassClsStubBuilder(
|
|||||||
private val classProto: ProtoBuf.Class,
|
private val classProto: ProtoBuf.Class,
|
||||||
private val nameResolver: NameResolver,
|
private val nameResolver: NameResolver,
|
||||||
private val classId: ClassId,
|
private val classId: ClassId,
|
||||||
private val source: SourceElement?,
|
source: SourceElement?,
|
||||||
private val outerContext: ClsStubBuilderContext
|
outerContext: ClsStubBuilderContext
|
||||||
) {
|
) {
|
||||||
private val thisAsProtoContainer = ProtoContainer.Class(
|
private val thisAsProtoContainer = ProtoContainer.Class(
|
||||||
classProto, nameResolver, TypeTable(classProto.typeTable), source, outerContext.protoContainer
|
classProto, nameResolver, TypeTable(classProto.typeTable), source, outerContext.protoContainer
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import java.io.DataInput
|
|||||||
import java.io.DataOutput
|
import java.io.DataOutput
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
abstract class KotlinFileIndexBase<T>(private val classOfIndex: Class<T>) : ScalarIndexExtension<FqName>() {
|
abstract class KotlinFileIndexBase<T>(classOfIndex: Class<T>) : ScalarIndexExtension<FqName>() {
|
||||||
val KEY: ID<FqName, Void> = ID.create(classOfIndex.canonicalName)
|
val KEY: ID<FqName, Void> = ID.create(classOfIndex.canonicalName)
|
||||||
|
|
||||||
private val KEY_DESCRIPTOR : KeyDescriptor<FqName> = object : KeyDescriptor<FqName> {
|
private val KEY_DESCRIPTOR : KeyDescriptor<FqName> = object : KeyDescriptor<FqName> {
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ class LookupElementsCollector(
|
|||||||
private val prefixMatcher: PrefixMatcher,
|
private val prefixMatcher: PrefixMatcher,
|
||||||
private val completionParameters: CompletionParameters,
|
private val completionParameters: CompletionParameters,
|
||||||
resultSet: CompletionResultSet,
|
resultSet: CompletionResultSet,
|
||||||
private val sorter: CompletionSorter
|
sorter: CompletionSorter
|
||||||
) {
|
) {
|
||||||
|
|
||||||
private val elements = ArrayList<LookupElement>()
|
private val elements = ArrayList<LookupElement>()
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ class SmartCompletionInBasicWeigher(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PreferContextElementsWeigher(private val context: DeclarationDescriptor) : LookupElementWeigher("kotlin.preferContextElements", true, false) {
|
class PreferContextElementsWeigher(context: DeclarationDescriptor) : LookupElementWeigher("kotlin.preferContextElements", true, false) {
|
||||||
private val contextElements = context.parentsWithSelf
|
private val contextElements = context.parentsWithSelf
|
||||||
.takeWhile { it !is PackageFragmentDescriptor }
|
.takeWhile { it !is PackageFragmentDescriptor }
|
||||||
.toList()
|
.toList()
|
||||||
|
|||||||
+2
-2
@@ -306,8 +306,8 @@ class TypeInstantiationItems(
|
|||||||
|
|
||||||
private inner class InheritanceSearcher(
|
private inner class InheritanceSearcher(
|
||||||
private val psiClass: PsiClass,
|
private val psiClass: PsiClass,
|
||||||
private val classDescriptor: ClassDescriptor,
|
classDescriptor: ClassDescriptor,
|
||||||
private val typeArgs: List<TypeProjection>,
|
typeArgs: List<TypeProjection>,
|
||||||
private val freeParameters: Collection<TypeParameterDescriptor>,
|
private val freeParameters: Collection<TypeParameterDescriptor>,
|
||||||
private val tail: Tail?) : InheritanceItemsSearcher {
|
private val tail: Tail?) : InheritanceItemsSearcher {
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ private class Prioritizer(private val file: KtFile, private val compareNames: Bo
|
|||||||
private val classifier = ImportableFqNameClassifier(file)
|
private val classifier = ImportableFqNameClassifier(file)
|
||||||
private val proximityComparator = PsiProximityComparator(file)
|
private val proximityComparator = PsiProximityComparator(file)
|
||||||
|
|
||||||
inner class Priority(private val descriptor: DeclarationDescriptor) : Comparable<Priority> {
|
inner class Priority(descriptor: DeclarationDescriptor) : Comparable<Priority> {
|
||||||
private val isDeprecated = KotlinBuiltIns.isDeprecated(descriptor)
|
private val isDeprecated = KotlinBuiltIns.isDeprecated(descriptor)
|
||||||
private val fqName = descriptor.importableFqName!!
|
private val fqName = descriptor.importableFqName!!
|
||||||
private val classification = classifier.classify(fqName, false)
|
private val classification = classifier.classify(fqName, false)
|
||||||
@@ -226,7 +226,7 @@ private class Prioritizer(private val file: KtFile, private val compareNames: Bo
|
|||||||
data class VariantWithPriority(val variant: AutoImportVariant, val priority: Priority)
|
data class VariantWithPriority(val variant: AutoImportVariant, val priority: Priority)
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DescriptorGroupPrioritizer(private val file: KtFile) {
|
private class DescriptorGroupPrioritizer(file: KtFile) {
|
||||||
private val prioritizer = Prioritizer(file, false)
|
private val prioritizer = Prioritizer(file, false)
|
||||||
|
|
||||||
inner class Priority(val descriptors: List<DeclarationDescriptor>) : Comparable<Priority> {
|
inner class Priority(val descriptors: List<DeclarationDescriptor>) : Comparable<Priority> {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import org.jetbrains.kotlin.types.KotlinType
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
|
|
||||||
class KotlinDebuggerCaches(private val project: Project) {
|
class KotlinDebuggerCaches(project: Project) {
|
||||||
|
|
||||||
private val cachedCompiledData = CachedValuesManager.getManager(project).createCachedValue(
|
private val cachedCompiledData = CachedValuesManager.getManager(project).createCachedValue(
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.utils.addToStdlib.check
|
|||||||
class ClassUsageReplacementStrategy(
|
class ClassUsageReplacementStrategy(
|
||||||
typeReplacement: KtUserType?,
|
typeReplacement: KtUserType?,
|
||||||
constructorReplacement: ReplaceWithAnnotationAnalyzer.ReplacementExpression?,
|
constructorReplacement: ReplaceWithAnnotationAnalyzer.ReplacementExpression?,
|
||||||
private val project: Project
|
project: Project
|
||||||
) : UsageReplacementStrategy {
|
) : UsageReplacementStrategy {
|
||||||
|
|
||||||
private val factory = KtPsiFactory(project)
|
private val factory = KtPsiFactory(project)
|
||||||
|
|||||||
+1
-1
@@ -159,7 +159,7 @@ interface OutputValue {
|
|||||||
val elementsToReplace: List<KtExpression>,
|
val elementsToReplace: List<KtExpression>,
|
||||||
val elementToInsertAfterCall: KtElement?,
|
val elementToInsertAfterCall: KtElement?,
|
||||||
val conditional: Boolean,
|
val conditional: Boolean,
|
||||||
private val builtIns: KotlinBuiltIns
|
builtIns: KotlinBuiltIns
|
||||||
): OutputValue {
|
): OutputValue {
|
||||||
override val originalExpressions: List<KtExpression> get() = elementsToReplace
|
override val originalExpressions: List<KtExpression> get() = elementsToReplace
|
||||||
override val valueType: KotlinType = with(builtIns) { if (conditional) booleanType else unitType }
|
override val valueType: KotlinType = with(builtIns) { if (conditional) booleanType else unitType }
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ class KotlinIntroduceParameterDialog private constructor(
|
|||||||
val descriptor: IntroduceParameterDescriptor,
|
val descriptor: IntroduceParameterDescriptor,
|
||||||
val lambdaExtractionDescriptor: ExtractableCodeDescriptor?,
|
val lambdaExtractionDescriptor: ExtractableCodeDescriptor?,
|
||||||
nameSuggestions: Array<String>,
|
nameSuggestions: Array<String>,
|
||||||
val typeSuggestions: List<KotlinType>,
|
typeSuggestions: List<KotlinType>,
|
||||||
val helper: KotlinIntroduceParameterHelper
|
val helper: KotlinIntroduceParameterHelper
|
||||||
): RefactoringDialog(project, true) {
|
): RefactoringDialog(project, true) {
|
||||||
constructor(
|
constructor(
|
||||||
|
|||||||
Reference in New Issue
Block a user