IDEA: unnecessary 'val's removed from constructors

This commit is contained in:
Mikhail Glukhikh
2016-04-27 13:34:51 +03:00
parent 1744897561
commit 84a3f729ca
10 changed files with 13 additions and 13 deletions
@@ -58,8 +58,8 @@ private class ClassClsStubBuilder(
private val classProto: ProtoBuf.Class,
private val nameResolver: NameResolver,
private val classId: ClassId,
private val source: SourceElement?,
private val outerContext: ClsStubBuilderContext
source: SourceElement?,
outerContext: ClsStubBuilderContext
) {
private val thisAsProtoContainer = ProtoContainer.Class(
classProto, nameResolver, TypeTable(classProto.typeTable), source, outerContext.protoContainer
@@ -28,7 +28,7 @@ import java.io.DataInput
import java.io.DataOutput
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)
private val KEY_DESCRIPTOR : KeyDescriptor<FqName> = object : KeyDescriptor<FqName> {
@@ -31,7 +31,7 @@ class LookupElementsCollector(
private val prefixMatcher: PrefixMatcher,
private val completionParameters: CompletionParameters,
resultSet: CompletionResultSet,
private val sorter: CompletionSorter
sorter: CompletionSorter
) {
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
.takeWhile { it !is PackageFragmentDescriptor }
.toList()
@@ -306,8 +306,8 @@ class TypeInstantiationItems(
private inner class InheritanceSearcher(
private val psiClass: PsiClass,
private val classDescriptor: ClassDescriptor,
private val typeArgs: List<TypeProjection>,
classDescriptor: ClassDescriptor,
typeArgs: List<TypeProjection>,
private val freeParameters: Collection<TypeParameterDescriptor>,
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 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 fqName = descriptor.importableFqName!!
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)
}
private class DescriptorGroupPrioritizer(private val file: KtFile) {
private class DescriptorGroupPrioritizer(file: KtFile) {
private val prioritizer = Prioritizer(file, false)
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.concurrent.ConcurrentHashMap
class KotlinDebuggerCaches(private val project: Project) {
class KotlinDebuggerCaches(project: Project) {
private val cachedCompiledData = CachedValuesManager.getManager(project).createCachedValue(
{
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.utils.addToStdlib.check
class ClassUsageReplacementStrategy(
typeReplacement: KtUserType?,
constructorReplacement: ReplaceWithAnnotationAnalyzer.ReplacementExpression?,
private val project: Project
project: Project
) : UsageReplacementStrategy {
private val factory = KtPsiFactory(project)
@@ -159,7 +159,7 @@ interface OutputValue {
val elementsToReplace: List<KtExpression>,
val elementToInsertAfterCall: KtElement?,
val conditional: Boolean,
private val builtIns: KotlinBuiltIns
builtIns: KotlinBuiltIns
): OutputValue {
override val originalExpressions: List<KtExpression> get() = elementsToReplace
override val valueType: KotlinType = with(builtIns) { if (conditional) booleanType else unitType }
@@ -51,7 +51,7 @@ class KotlinIntroduceParameterDialog private constructor(
val descriptor: IntroduceParameterDescriptor,
val lambdaExtractionDescriptor: ExtractableCodeDescriptor?,
nameSuggestions: Array<String>,
val typeSuggestions: List<KotlinType>,
typeSuggestions: List<KotlinType>,
val helper: KotlinIntroduceParameterHelper
): RefactoringDialog(project, true) {
constructor(