Core & compiler: unnecessary 'val's removed from constructors
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ class AnnotatedWithFakeAnnotations(override val originalAnnotated: Annotated, pr
|
|||||||
override fun getAnnotations() = actual
|
override fun getAnnotations() = actual
|
||||||
}
|
}
|
||||||
|
|
||||||
class AnnotatedWithOnlyTargetedAnnotations(private val original: Annotated) : Annotated {
|
class AnnotatedWithOnlyTargetedAnnotations(original: Annotated) : Annotated {
|
||||||
private val annotations: Annotations = UseSiteTargetedAnnotations(original.annotations)
|
private val annotations: Annotations = UseSiteTargetedAnnotations(original.annotations)
|
||||||
|
|
||||||
override fun getAnnotations() = annotations
|
override fun getAnnotations() = annotations
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.incremental.components.Position
|
|||||||
import org.jetbrains.kotlin.incremental.components.ScopeKind
|
import org.jetbrains.kotlin.incremental.components.ScopeKind
|
||||||
|
|
||||||
|
|
||||||
class RemoteLookupTrackerClient(val facade: CompilerCallbackServicesFacade, val eventManger: EventManger, val profiler: Profiler = DummyProfiler()) : LookupTracker {
|
class RemoteLookupTrackerClient(val facade: CompilerCallbackServicesFacade, eventManger: EventManger, val profiler: Profiler = DummyProfiler()) : LookupTracker {
|
||||||
private val isDoNothing = profiler.withMeasure(this) { facade.lookupTracker_isDoNothing() }
|
private val isDoNothing = profiler.withMeasure(this) { facade.lookupTracker_isDoNothing() }
|
||||||
|
|
||||||
private val lookups = hashSetOf<LookupInfo>()
|
private val lookups = hashSetOf<LookupInfo>()
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import org.jetbrains.kotlin.psi.*
|
|||||||
|
|
||||||
class ManualVariance(val descriptor: TypeParameterDescriptor, val variance: Variance)
|
class ManualVariance(val descriptor: TypeParameterDescriptor, val variance: Variance)
|
||||||
|
|
||||||
class VarianceChecker(private val trace: BindingTrace) {
|
class VarianceChecker(trace: BindingTrace) {
|
||||||
private val core = VarianceCheckerCore(trace.bindingContext, trace)
|
private val core = VarianceCheckerCore(trace.bindingContext, trace)
|
||||||
|
|
||||||
fun check(c: TopDownAnalysisContext) {
|
fun check(c: TopDownAnalysisContext) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import org.jetbrains.kotlin.types.isDynamic
|
|||||||
import org.jetbrains.kotlin.utils.Printer
|
import org.jetbrains.kotlin.utils.Printer
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class DynamicCallableDescriptors(private val builtIns: KotlinBuiltIns) {
|
class DynamicCallableDescriptors(builtIns: KotlinBuiltIns) {
|
||||||
|
|
||||||
val dynamicType = createDynamicType(builtIns)
|
val dynamicType = createDynamicType(builtIns)
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ open class FileScopeProviderImpl(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we use this dummy implementation of DeclarationDescriptor to check accessibility of symbols from the current package
|
// we use this dummy implementation of DeclarationDescriptor to check accessibility of symbols from the current package
|
||||||
private class DummyContainerDescriptor(private val file: KtFile, private val packageFragment: PackageFragmentDescriptor) : DeclarationDescriptorNonRoot {
|
private class DummyContainerDescriptor(file: KtFile, private val packageFragment: PackageFragmentDescriptor) : DeclarationDescriptorNonRoot {
|
||||||
private val sourceElement = KotlinSourceElement(file)
|
private val sourceElement = KotlinSourceElement(file)
|
||||||
|
|
||||||
override fun getContainingDeclaration() = packageFragment
|
override fun getContainingDeclaration() = packageFragment
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ import org.jetbrains.kotlin.psi.psiUtil.parents
|
|||||||
*/
|
*/
|
||||||
class KotlinCodeBlockModificationListener(
|
class KotlinCodeBlockModificationListener(
|
||||||
modificationTracker: PsiModificationTracker,
|
modificationTracker: PsiModificationTracker,
|
||||||
private val project: Project,
|
project: Project,
|
||||||
private val treeAspect: TreeAspect
|
private val treeAspect: TreeAspect
|
||||||
) {
|
) {
|
||||||
init {
|
init {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import org.jetbrains.kotlin.serialization.deserialization.ClassDataFinder
|
|||||||
import org.jetbrains.kotlin.serialization.deserialization.NameResolver
|
import org.jetbrains.kotlin.serialization.deserialization.NameResolver
|
||||||
|
|
||||||
class BuiltInsClassDataFinder(
|
class BuiltInsClassDataFinder(
|
||||||
private val proto: BuiltInsProtoBuf.BuiltIns,
|
proto: BuiltInsProtoBuf.BuiltIns,
|
||||||
private val nameResolver: NameResolver
|
private val nameResolver: NameResolver
|
||||||
) : ClassDataFinder {
|
) : ClassDataFinder {
|
||||||
private val classIdToProto =
|
private val classIdToProto =
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.utils.toReadOnlyList
|
|||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
|
|
||||||
class FunctionClassScope(
|
class FunctionClassScope(
|
||||||
private val storageManager: StorageManager,
|
storageManager: StorageManager,
|
||||||
private val functionClass: FunctionClassDescriptor
|
private val functionClass: FunctionClassDescriptor
|
||||||
) : MemberScopeImpl() {
|
) : MemberScopeImpl() {
|
||||||
private val allDescriptors = storageManager.createLazyValue {
|
private val allDescriptors = storageManager.createLazyValue {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.types
|
|||||||
import org.jetbrains.kotlin.descriptors.SupertypeLoopChecker
|
import org.jetbrains.kotlin.descriptors.SupertypeLoopChecker
|
||||||
import org.jetbrains.kotlin.storage.StorageManager
|
import org.jetbrains.kotlin.storage.StorageManager
|
||||||
|
|
||||||
abstract class AbstractTypeConstructor(private val storageManager: StorageManager) : TypeConstructor {
|
abstract class AbstractTypeConstructor(storageManager: StorageManager) : TypeConstructor {
|
||||||
override fun getSupertypes() = supertypes().supertypesWithoutCycles
|
override fun getSupertypes() = supertypes().supertypesWithoutCycles
|
||||||
|
|
||||||
// In current version diagnostic about loops in supertypes is reported on each vertex (supertype reference) that lies on the cycle.
|
// In current version diagnostic about loops in supertypes is reported on each vertex (supertype reference) that lies on the cycle.
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ import org.jetbrains.kotlin.types.KotlinType
|
|||||||
|
|
||||||
class AnnotationAndConstantLoaderImpl(
|
class AnnotationAndConstantLoaderImpl(
|
||||||
module: ModuleDescriptor,
|
module: ModuleDescriptor,
|
||||||
private val notFoundClasses: NotFoundClasses,
|
notFoundClasses: NotFoundClasses,
|
||||||
private val protocol: SerializerExtensionProtocol
|
private val protocol: SerializerExtensionProtocol
|
||||||
) : AnnotationAndConstantLoader<AnnotationDescriptor, ConstantValue<*>, AnnotationWithTarget> {
|
) : AnnotationAndConstantLoader<AnnotationDescriptor, ConstantValue<*>, AnnotationWithTarget> {
|
||||||
private val deserializer = AnnotationDeserializer(module, notFoundClasses)
|
private val deserializer = AnnotationDeserializer(module, notFoundClasses)
|
||||||
|
|||||||
Reference in New Issue
Block a user