From 98e87f2f95c0d5f63d9ec6b95e06b9a7ac6da596 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Sat, 5 Jul 2014 18:10:35 +0400 Subject: [PATCH] Removing unneeded "public override val" from constructors across the project #KT-4295 Fixed --- compiler/backend-common/src/output.kt | 4 +- .../lang/cfg/pseudocode/PseudoValueImpl.kt | 6 +-- .../instructions/InstructionImpl.kt | 2 +- .../instructions/JetElementInstructionImpl.kt | 2 +- .../instructions/eval/accessInstructions.kt | 2 +- .../eval/operationInstructions.kt | 4 +- .../model/VariableAsFunctionResolvedCall.kt | 4 +- core/builtins/src/kotlin/Progressions.kt | 42 +++++++++---------- core/builtins/src/kotlin/PropertyMetadata.kt | 2 +- core/builtins/src/kotlin/Ranges.kt | 14 +++---- .../jvm/internal/KForeignMemberProperty.kt | 2 +- .../jvm/internal/KMemberPropertyImpl.kt | 2 +- .../KTopLevelExtensionPropertyImpl.kt | 2 +- .../jvm/internal/KTopLevelVariableImpl.kt | 2 +- .../jet/generators/builtins/progressions.kt | 6 +-- .../jet/generators/builtins/ranges.kt | 2 +- .../search/usagesSearch/searchHelpers.kt | 6 +-- .../org/jetbrains/jet/j2k/ast/Identifier.kt | 2 +- libraries/stdlib/src/kotlin/Ranges.kt | 4 +- .../src/kotlin/concurrent/FunctionalList.kt | 2 +- 20 files changed, 56 insertions(+), 56 deletions(-) diff --git a/compiler/backend-common/src/output.kt b/compiler/backend-common/src/output.kt index 52e6fe33278..bc1ac8bfb89 100644 --- a/compiler/backend-common/src/output.kt +++ b/compiler/backend-common/src/output.kt @@ -38,8 +38,8 @@ public trait OutputFile { } class SimpleOutputFile( - public override val sourceFiles: List, - public override val relativePath: String, + override val sourceFiles: List, + override val relativePath: String, private val content: String ) : OutputFile { override fun asByteArray(): ByteArray = content.toByteArray() diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/PseudoValueImpl.kt b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/PseudoValueImpl.kt index c5ce4ee1354..6f9eb0f6d5a 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/PseudoValueImpl.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/PseudoValueImpl.kt @@ -20,9 +20,9 @@ import org.jetbrains.jet.lang.psi.JetElement import org.jetbrains.jet.lang.cfg.pseudocode.instructions.eval.InstructionWithValue class PseudoValueImpl( - public override val debugName: String, - public override val element: JetElement?, - public override val createdAt: InstructionWithValue + override val debugName: String, + override val element: JetElement?, + override val createdAt: InstructionWithValue ) : PseudoValue { override fun toString(): String = debugName } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/InstructionImpl.kt b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/InstructionImpl.kt index 3318a932b83..e84e9018cbe 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/InstructionImpl.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/InstructionImpl.kt @@ -23,7 +23,7 @@ import com.google.common.collect.Sets import org.jetbrains.jet.lang.cfg.pseudocode.Pseudocode import org.jetbrains.jet.lang.cfg.pseudocode.PseudoValue -public abstract class InstructionImpl(public override val lexicalScope: LexicalScope): Instruction { +public abstract class InstructionImpl(override val lexicalScope: LexicalScope): Instruction { private var _owner: Pseudocode? = null override var owner: Pseudocode diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/JetElementInstructionImpl.kt b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/JetElementInstructionImpl.kt index c6867191893..ba09e6c59d3 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/JetElementInstructionImpl.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/JetElementInstructionImpl.kt @@ -20,7 +20,7 @@ import com.intellij.psi.PsiElement import org.jetbrains.jet.lang.psi.JetElement public abstract class JetElementInstructionImpl( - public override val element: JetElement, + override val element: JetElement, lexicalScope: LexicalScope ) : InstructionImpl(lexicalScope), JetElementInstruction { protected fun render(element: PsiElement): String = diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/accessInstructions.kt b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/accessInstructions.kt index 750faa6131d..54bad1bcb8a 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/accessInstructions.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/accessInstructions.kt @@ -39,7 +39,7 @@ public abstract class AccessValueInstruction protected ( element: JetElement, lexicalScope: LexicalScope, public val target: AccessTarget, - public override val receiverValues: Map + override val receiverValues: Map ) : InstructionWithNext(element, lexicalScope), InstructionWithReceivers public class ReadValueInstruction private ( diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/operationInstructions.kt b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/operationInstructions.kt index b77374e9eb4..7f0039a2eae 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/operationInstructions.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/operationInstructions.kt @@ -31,7 +31,7 @@ import org.jetbrains.jet.lang.cfg.pseudocode.TypePredicate public abstract class OperationInstruction protected( element: JetElement, lexicalScope: LexicalScope, - public override val inputValues: List + override val inputValues: List ) : InstructionWithNext(element, lexicalScope), InstructionWithValue { protected var resultValue: PseudoValue? = null @@ -62,7 +62,7 @@ public class CallInstruction private( element: JetElement, lexicalScope: LexicalScope, val resolvedCall: ResolvedCall<*>, - public override val receiverValues: Map, + override val receiverValues: Map, public val arguments: Map ) : OperationInstruction(element, lexicalScope, receiverValues.keySet() + arguments.keySet()), InstructionWithReceivers { override fun accept(visitor: InstructionVisitor) { diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/VariableAsFunctionResolvedCall.kt b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/VariableAsFunctionResolvedCall.kt index a8e30db4788..9a74ccc70ac 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/VariableAsFunctionResolvedCall.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/VariableAsFunctionResolvedCall.kt @@ -34,8 +34,8 @@ public trait VariableAsFunctionResolvedCall { } class VariableAsFunctionResolvedCallImpl( - public override val functionCall: MutableResolvedCall, - public override val variableCall: MutableResolvedCall + override val functionCall: MutableResolvedCall, + override val variableCall: MutableResolvedCall ) : VariableAsFunctionResolvedCall, MutableResolvedCall by functionCall { override fun markCallAsCompleted() { diff --git a/core/builtins/src/kotlin/Progressions.kt b/core/builtins/src/kotlin/Progressions.kt index 4d35c7ea78a..8b21de4f64a 100644 --- a/core/builtins/src/kotlin/Progressions.kt +++ b/core/builtins/src/kotlin/Progressions.kt @@ -19,9 +19,9 @@ package kotlin public class ByteProgression( - public override val start: Byte, - public override val end: Byte, - public override val increment: Int + override val start: Byte, + override val end: Byte, + override val increment: Int ) : Progression { { if (increment == 0) throw IllegalArgumentException("Increment must be non-zero") @@ -42,9 +42,9 @@ public class ByteProgression( } public class CharProgression( - public override val start: Char, - public override val end: Char, - public override val increment: Int + override val start: Char, + override val end: Char, + override val increment: Int ) : Progression { { if (increment == 0) throw IllegalArgumentException("Increment must be non-zero") @@ -65,9 +65,9 @@ public class CharProgression( } public class ShortProgression( - public override val start: Short, - public override val end: Short, - public override val increment: Int + override val start: Short, + override val end: Short, + override val increment: Int ) : Progression { { if (increment == 0) throw IllegalArgumentException("Increment must be non-zero") @@ -88,9 +88,9 @@ public class ShortProgression( } public class IntProgression( - public override val start: Int, - public override val end: Int, - public override val increment: Int + override val start: Int, + override val end: Int, + override val increment: Int ) : Progression { { if (increment == 0) throw IllegalArgumentException("Increment must be non-zero") @@ -111,9 +111,9 @@ public class IntProgression( } public class LongProgression( - public override val start: Long, - public override val end: Long, - public override val increment: Long + override val start: Long, + override val end: Long, + override val increment: Long ) : Progression { { if (increment == 0L) throw IllegalArgumentException("Increment must be non-zero") @@ -134,9 +134,9 @@ public class LongProgression( } public class FloatProgression( - public override val start: Float, - public override val end: Float, - public override val increment: Float + override val start: Float, + override val end: Float, + override val increment: Float ) : Progression { { if (java.lang.Float.isNaN(increment)) throw IllegalArgumentException("Increment must be not NaN") @@ -158,9 +158,9 @@ public class FloatProgression( } public class DoubleProgression( - public override val start: Double, - public override val end: Double, - public override val increment: Double + override val start: Double, + override val end: Double, + override val increment: Double ) : Progression { { if (java.lang.Double.isNaN(increment)) throw IllegalArgumentException("Increment must be not NaN") diff --git a/core/builtins/src/kotlin/PropertyMetadata.kt b/core/builtins/src/kotlin/PropertyMetadata.kt index d3ebb499494..dddff3e33f8 100644 --- a/core/builtins/src/kotlin/PropertyMetadata.kt +++ b/core/builtins/src/kotlin/PropertyMetadata.kt @@ -20,4 +20,4 @@ public trait PropertyMetadata { public val name: String } -public class PropertyMetadataImpl(public override val name: String): PropertyMetadata +public class PropertyMetadataImpl(override val name: String): PropertyMetadata diff --git a/core/builtins/src/kotlin/Ranges.kt b/core/builtins/src/kotlin/Ranges.kt index eec2e24f6c8..325b4963426 100644 --- a/core/builtins/src/kotlin/Ranges.kt +++ b/core/builtins/src/kotlin/Ranges.kt @@ -18,7 +18,7 @@ package kotlin -public class ByteRange(public override val start: Byte, public override val end: Byte) : Range, Progression { +public class ByteRange(override val start: Byte, override val end: Byte) : Range, Progression { override val increment: Int get() = 1 @@ -40,7 +40,7 @@ public class ByteRange(public override val start: Byte, public override val end: } } -public class CharRange(public override val start: Char, public override val end: Char) : Range, Progression { +public class CharRange(override val start: Char, override val end: Char) : Range, Progression { override val increment: Int get() = 1 @@ -62,7 +62,7 @@ public class CharRange(public override val start: Char, public override val end: } } -public class ShortRange(public override val start: Short, public override val end: Short) : Range, Progression { +public class ShortRange(override val start: Short, override val end: Short) : Range, Progression { override val increment: Int get() = 1 @@ -84,7 +84,7 @@ public class ShortRange(public override val start: Short, public override val en } } -public class IntRange(public override val start: Int, public override val end: Int) : Range, Progression { +public class IntRange(override val start: Int, override val end: Int) : Range, Progression { override val increment: Int get() = 1 @@ -106,7 +106,7 @@ public class IntRange(public override val start: Int, public override val end: I } } -public class LongRange(public override val start: Long, public override val end: Long) : Range, Progression { +public class LongRange(override val start: Long, override val end: Long) : Range, Progression { override val increment: Long get() = 1 @@ -128,7 +128,7 @@ public class LongRange(public override val start: Long, public override val end: } } -public class FloatRange(public override val start: Float, public override val end: Float) : Range, Progression { +public class FloatRange(override val start: Float, override val end: Float) : Range, Progression { override val increment: Float get() = 1.0f @@ -150,7 +150,7 @@ public class FloatRange(public override val start: Float, public override val en } } -public class DoubleRange(public override val start: Double, public override val end: Double) : Range, Progression { +public class DoubleRange(override val start: Double, override val end: Double) : Range, Progression { override val increment: Double get() = 1.0 diff --git a/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KForeignMemberProperty.kt b/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KForeignMemberProperty.kt index 50b0541b1d8..ec8573333cb 100644 --- a/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KForeignMemberProperty.kt +++ b/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KForeignMemberProperty.kt @@ -20,7 +20,7 @@ import java.lang.reflect.* import kotlin.reflect.* open class KForeignMemberProperty( - public override val name: String, + override val name: String, protected val owner: KClassImpl ) : KMemberProperty, KPropertyImpl { override val field: Field = try { diff --git a/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KMemberPropertyImpl.kt b/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KMemberPropertyImpl.kt index bd19fe400b2..b5b706c773c 100644 --- a/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KMemberPropertyImpl.kt +++ b/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KMemberPropertyImpl.kt @@ -22,7 +22,7 @@ import kotlin.reflect.* // TODO: properties of built-in classes open class KMemberPropertyImpl( - public override val name: String, + override val name: String, protected val owner: KClassImpl ) : KMemberProperty, KPropertyImpl { override val field: Field? diff --git a/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KTopLevelExtensionPropertyImpl.kt b/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KTopLevelExtensionPropertyImpl.kt index e60ecc9ae20..01e1b284f26 100644 --- a/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KTopLevelExtensionPropertyImpl.kt +++ b/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KTopLevelExtensionPropertyImpl.kt @@ -20,7 +20,7 @@ import java.lang.reflect.* import kotlin.reflect.* open class KTopLevelExtensionPropertyImpl( - public override val name: String, + override val name: String, protected val owner: KPackageImpl, protected val receiverClass: Class ) : KTopLevelExtensionProperty, KPropertyImpl { diff --git a/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KTopLevelVariableImpl.kt b/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KTopLevelVariableImpl.kt index 8fa6a06609b..c02d6bbc422 100644 --- a/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KTopLevelVariableImpl.kt +++ b/core/runtime.jvm/src/kotlin/reflect/jvm/internal/KTopLevelVariableImpl.kt @@ -20,7 +20,7 @@ import java.lang.reflect.* import kotlin.reflect.* open class KTopLevelVariableImpl( - public override val name: String, + override val name: String, protected val owner: KPackageImpl ) : KTopLevelVariable, KVariableImpl { // TODO: load the field from the corresponding package part diff --git a/generators/src/org/jetbrains/jet/generators/builtins/progressions.kt b/generators/src/org/jetbrains/jet/generators/builtins/progressions.kt index c55d4d7ce4a..4156297d650 100644 --- a/generators/src/org/jetbrains/jet/generators/builtins/progressions.kt +++ b/generators/src/org/jetbrains/jet/generators/builtins/progressions.kt @@ -66,9 +66,9 @@ class GenerateProgressions(out: PrintWriter) : BuiltInsSourceGenerator(out) { out.println( """public class $progression( - public override val start: $t, - public override val end: $t, - public override val increment: $incrementType + override val start: $t, + override val end: $t, + override val increment: $incrementType ) : Progression<$t> { { $constructor diff --git a/generators/src/org/jetbrains/jet/generators/builtins/ranges.kt b/generators/src/org/jetbrains/jet/generators/builtins/ranges.kt index e7d92a05ed3..6e5949e7173 100644 --- a/generators/src/org/jetbrains/jet/generators/builtins/ranges.kt +++ b/generators/src/org/jetbrains/jet/generators/builtins/ranges.kt @@ -63,7 +63,7 @@ class GenerateRanges(out: PrintWriter) : BuiltInsSourceGenerator(out) { } out.println( -"""public class $range(public override val start: $t, public override val end: $t) : Range<$t>, Progression<$t> { +"""public class $range(override val start: $t, override val end: $t) : Range<$t>, Progression<$t> { override val increment: $incrementType get() = $increment diff --git a/idea/src/org/jetbrains/jet/plugin/search/usagesSearch/searchHelpers.kt b/idea/src/org/jetbrains/jet/plugin/search/usagesSearch/searchHelpers.kt index 53150278fdb..e7bd532cd39 100644 --- a/idea/src/org/jetbrains/jet/plugin/search/usagesSearch/searchHelpers.kt +++ b/idea/src/org/jetbrains/jet/plugin/search/usagesSearch/searchHelpers.kt @@ -107,7 +107,7 @@ trait ImportAwareSearchHelper { } open class DefaultSearchHelper( - public override val skipImports: Boolean = false + override val skipImports: Boolean = false ): UsagesSearchHelper(), ImportAwareSearchHelper { override fun makeFilter(target: UsagesSearchTarget): UsagesSearchFilter = isTargetUsage and isFilteredImport } @@ -163,8 +163,8 @@ val isExtensionUsage = (PsiReference::isExtensionOfDeclarationClassUsage).search class FunctionUsagesSearchHelper( public val overloadUsages: Boolean = false, public val extensionUsages: Boolean = false, - public override val selfUsages: Boolean = true, - public override val overrideUsages: Boolean = true, + override val selfUsages: Boolean = true, + override val overrideUsages: Boolean = true, skipImports: Boolean = false ) : DefaultSearchHelper(skipImports), OverrideSearchHelper { override fun makeFilter(target: UsagesSearchTarget): UsagesSearchFilter { diff --git a/j2k/src/org/jetbrains/jet/j2k/ast/Identifier.kt b/j2k/src/org/jetbrains/jet/j2k/ast/Identifier.kt index 6066082eda3..d2bf0331d0c 100644 --- a/j2k/src/org/jetbrains/jet/j2k/ast/Identifier.kt +++ b/j2k/src/org/jetbrains/jet/j2k/ast/Identifier.kt @@ -26,7 +26,7 @@ fun PsiNameIdentifierOwner.declarationIdentifier(): Identifier { class Identifier( val name: String, - public override val isNullable: Boolean = true, + override val isNullable: Boolean = true, private val quotingNeeded: Boolean = true ) : Expression() { diff --git a/libraries/stdlib/src/kotlin/Ranges.kt b/libraries/stdlib/src/kotlin/Ranges.kt index d4a4c46d860..fe780618edd 100644 --- a/libraries/stdlib/src/kotlin/Ranges.kt +++ b/libraries/stdlib/src/kotlin/Ranges.kt @@ -1,8 +1,8 @@ package kotlin public class ComparableRange> ( - public override val start: T, - public override val end: T + override val start: T, + override val end: T ): Range { override fun contains(item: T): Boolean { return start <= item && item <= end diff --git a/libraries/stdlib/src/kotlin/concurrent/FunctionalList.kt b/libraries/stdlib/src/kotlin/concurrent/FunctionalList.kt index b30f8a10e27..ef0ff47d5a8 100644 --- a/libraries/stdlib/src/kotlin/concurrent/FunctionalList.kt +++ b/libraries/stdlib/src/kotlin/concurrent/FunctionalList.kt @@ -46,7 +46,7 @@ abstract class FunctionalList(public val size: Int) { get() = throw java.util.NoSuchElementException() } - class Standard(public override val head: T, public override val tail: FunctionalList) : FunctionalList(tail.size+1) + class Standard(override val head: T, override val tail: FunctionalList) : FunctionalList(tail.size+1) public fun emptyList() : FunctionalList = Empty()