Removing unneeded "public override val" from constructors across the project
#KT-4295 Fixed
This commit is contained in:
@@ -38,8 +38,8 @@ public trait OutputFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class SimpleOutputFile(
|
class SimpleOutputFile(
|
||||||
public override val sourceFiles: List<File>,
|
override val sourceFiles: List<File>,
|
||||||
public override val relativePath: String,
|
override val relativePath: String,
|
||||||
private val content: String
|
private val content: String
|
||||||
) : OutputFile {
|
) : OutputFile {
|
||||||
override fun asByteArray(): ByteArray = content.toByteArray()
|
override fun asByteArray(): ByteArray = content.toByteArray()
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ import org.jetbrains.jet.lang.psi.JetElement
|
|||||||
import org.jetbrains.jet.lang.cfg.pseudocode.instructions.eval.InstructionWithValue
|
import org.jetbrains.jet.lang.cfg.pseudocode.instructions.eval.InstructionWithValue
|
||||||
|
|
||||||
class PseudoValueImpl(
|
class PseudoValueImpl(
|
||||||
public override val debugName: String,
|
override val debugName: String,
|
||||||
public override val element: JetElement?,
|
override val element: JetElement?,
|
||||||
public override val createdAt: InstructionWithValue
|
override val createdAt: InstructionWithValue
|
||||||
) : PseudoValue {
|
) : PseudoValue {
|
||||||
override fun toString(): String = debugName
|
override fun toString(): String = debugName
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -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.Pseudocode
|
||||||
import org.jetbrains.jet.lang.cfg.pseudocode.PseudoValue
|
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
|
private var _owner: Pseudocode? = null
|
||||||
|
|
||||||
override var owner: Pseudocode
|
override var owner: Pseudocode
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ import com.intellij.psi.PsiElement
|
|||||||
import org.jetbrains.jet.lang.psi.JetElement
|
import org.jetbrains.jet.lang.psi.JetElement
|
||||||
|
|
||||||
public abstract class JetElementInstructionImpl(
|
public abstract class JetElementInstructionImpl(
|
||||||
public override val element: JetElement,
|
override val element: JetElement,
|
||||||
lexicalScope: LexicalScope
|
lexicalScope: LexicalScope
|
||||||
) : InstructionImpl(lexicalScope), JetElementInstruction {
|
) : InstructionImpl(lexicalScope), JetElementInstruction {
|
||||||
protected fun render(element: PsiElement): String =
|
protected fun render(element: PsiElement): String =
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public abstract class AccessValueInstruction protected (
|
|||||||
element: JetElement,
|
element: JetElement,
|
||||||
lexicalScope: LexicalScope,
|
lexicalScope: LexicalScope,
|
||||||
public val target: AccessTarget,
|
public val target: AccessTarget,
|
||||||
public override val receiverValues: Map<PseudoValue, ReceiverValue>
|
override val receiverValues: Map<PseudoValue, ReceiverValue>
|
||||||
) : InstructionWithNext(element, lexicalScope), InstructionWithReceivers
|
) : InstructionWithNext(element, lexicalScope), InstructionWithReceivers
|
||||||
|
|
||||||
public class ReadValueInstruction private (
|
public class ReadValueInstruction private (
|
||||||
|
|||||||
+2
-2
@@ -31,7 +31,7 @@ import org.jetbrains.jet.lang.cfg.pseudocode.TypePredicate
|
|||||||
public abstract class OperationInstruction protected(
|
public abstract class OperationInstruction protected(
|
||||||
element: JetElement,
|
element: JetElement,
|
||||||
lexicalScope: LexicalScope,
|
lexicalScope: LexicalScope,
|
||||||
public override val inputValues: List<PseudoValue>
|
override val inputValues: List<PseudoValue>
|
||||||
) : InstructionWithNext(element, lexicalScope), InstructionWithValue {
|
) : InstructionWithNext(element, lexicalScope), InstructionWithValue {
|
||||||
protected var resultValue: PseudoValue? = null
|
protected var resultValue: PseudoValue? = null
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ public class CallInstruction private(
|
|||||||
element: JetElement,
|
element: JetElement,
|
||||||
lexicalScope: LexicalScope,
|
lexicalScope: LexicalScope,
|
||||||
val resolvedCall: ResolvedCall<*>,
|
val resolvedCall: ResolvedCall<*>,
|
||||||
public override val receiverValues: Map<PseudoValue, ReceiverValue>,
|
override val receiverValues: Map<PseudoValue, ReceiverValue>,
|
||||||
public val arguments: Map<PseudoValue, ValueParameterDescriptor>
|
public val arguments: Map<PseudoValue, ValueParameterDescriptor>
|
||||||
) : OperationInstruction(element, lexicalScope, receiverValues.keySet() + arguments.keySet()), InstructionWithReceivers {
|
) : OperationInstruction(element, lexicalScope, receiverValues.keySet() + arguments.keySet()), InstructionWithReceivers {
|
||||||
override fun accept(visitor: InstructionVisitor) {
|
override fun accept(visitor: InstructionVisitor) {
|
||||||
|
|||||||
+2
-2
@@ -34,8 +34,8 @@ public trait VariableAsFunctionResolvedCall {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class VariableAsFunctionResolvedCallImpl(
|
class VariableAsFunctionResolvedCallImpl(
|
||||||
public override val functionCall: MutableResolvedCall<FunctionDescriptor>,
|
override val functionCall: MutableResolvedCall<FunctionDescriptor>,
|
||||||
public override val variableCall: MutableResolvedCall<VariableDescriptor>
|
override val variableCall: MutableResolvedCall<VariableDescriptor>
|
||||||
) : VariableAsFunctionResolvedCall, MutableResolvedCall<FunctionDescriptor> by functionCall {
|
) : VariableAsFunctionResolvedCall, MutableResolvedCall<FunctionDescriptor> by functionCall {
|
||||||
|
|
||||||
override fun markCallAsCompleted() {
|
override fun markCallAsCompleted() {
|
||||||
|
|||||||
@@ -19,9 +19,9 @@
|
|||||||
package kotlin
|
package kotlin
|
||||||
|
|
||||||
public class ByteProgression(
|
public class ByteProgression(
|
||||||
public override val start: Byte,
|
override val start: Byte,
|
||||||
public override val end: Byte,
|
override val end: Byte,
|
||||||
public override val increment: Int
|
override val increment: Int
|
||||||
) : Progression<Byte> {
|
) : Progression<Byte> {
|
||||||
{
|
{
|
||||||
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
||||||
@@ -42,9 +42,9 @@ public class ByteProgression(
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class CharProgression(
|
public class CharProgression(
|
||||||
public override val start: Char,
|
override val start: Char,
|
||||||
public override val end: Char,
|
override val end: Char,
|
||||||
public override val increment: Int
|
override val increment: Int
|
||||||
) : Progression<Char> {
|
) : Progression<Char> {
|
||||||
{
|
{
|
||||||
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
||||||
@@ -65,9 +65,9 @@ public class CharProgression(
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class ShortProgression(
|
public class ShortProgression(
|
||||||
public override val start: Short,
|
override val start: Short,
|
||||||
public override val end: Short,
|
override val end: Short,
|
||||||
public override val increment: Int
|
override val increment: Int
|
||||||
) : Progression<Short> {
|
) : Progression<Short> {
|
||||||
{
|
{
|
||||||
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
||||||
@@ -88,9 +88,9 @@ public class ShortProgression(
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class IntProgression(
|
public class IntProgression(
|
||||||
public override val start: Int,
|
override val start: Int,
|
||||||
public override val end: Int,
|
override val end: Int,
|
||||||
public override val increment: Int
|
override val increment: Int
|
||||||
) : Progression<Int> {
|
) : Progression<Int> {
|
||||||
{
|
{
|
||||||
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
||||||
@@ -111,9 +111,9 @@ public class IntProgression(
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class LongProgression(
|
public class LongProgression(
|
||||||
public override val start: Long,
|
override val start: Long,
|
||||||
public override val end: Long,
|
override val end: Long,
|
||||||
public override val increment: Long
|
override val increment: Long
|
||||||
) : Progression<Long> {
|
) : Progression<Long> {
|
||||||
{
|
{
|
||||||
if (increment == 0L) throw IllegalArgumentException("Increment must be non-zero")
|
if (increment == 0L) throw IllegalArgumentException("Increment must be non-zero")
|
||||||
@@ -134,9 +134,9 @@ public class LongProgression(
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class FloatProgression(
|
public class FloatProgression(
|
||||||
public override val start: Float,
|
override val start: Float,
|
||||||
public override val end: Float,
|
override val end: Float,
|
||||||
public override val increment: Float
|
override val increment: Float
|
||||||
) : Progression<Float> {
|
) : Progression<Float> {
|
||||||
{
|
{
|
||||||
if (java.lang.Float.isNaN(increment)) throw IllegalArgumentException("Increment must be not NaN")
|
if (java.lang.Float.isNaN(increment)) throw IllegalArgumentException("Increment must be not NaN")
|
||||||
@@ -158,9 +158,9 @@ public class FloatProgression(
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class DoubleProgression(
|
public class DoubleProgression(
|
||||||
public override val start: Double,
|
override val start: Double,
|
||||||
public override val end: Double,
|
override val end: Double,
|
||||||
public override val increment: Double
|
override val increment: Double
|
||||||
) : Progression<Double> {
|
) : Progression<Double> {
|
||||||
{
|
{
|
||||||
if (java.lang.Double.isNaN(increment)) throw IllegalArgumentException("Increment must be not NaN")
|
if (java.lang.Double.isNaN(increment)) throw IllegalArgumentException("Increment must be not NaN")
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ public trait PropertyMetadata {
|
|||||||
public val name: String
|
public val name: String
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PropertyMetadataImpl(public override val name: String): PropertyMetadata
|
public class PropertyMetadataImpl(override val name: String): PropertyMetadata
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
package kotlin
|
package kotlin
|
||||||
|
|
||||||
public class ByteRange(public override val start: Byte, public override val end: Byte) : Range<Byte>, Progression<Byte> {
|
public class ByteRange(override val start: Byte, override val end: Byte) : Range<Byte>, Progression<Byte> {
|
||||||
override val increment: Int
|
override val increment: Int
|
||||||
get() = 1
|
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<Char>, Progression<Char> {
|
public class CharRange(override val start: Char, override val end: Char) : Range<Char>, Progression<Char> {
|
||||||
override val increment: Int
|
override val increment: Int
|
||||||
get() = 1
|
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<Short>, Progression<Short> {
|
public class ShortRange(override val start: Short, override val end: Short) : Range<Short>, Progression<Short> {
|
||||||
override val increment: Int
|
override val increment: Int
|
||||||
get() = 1
|
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<Int>, Progression<Int> {
|
public class IntRange(override val start: Int, override val end: Int) : Range<Int>, Progression<Int> {
|
||||||
override val increment: Int
|
override val increment: Int
|
||||||
get() = 1
|
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<Long>, Progression<Long> {
|
public class LongRange(override val start: Long, override val end: Long) : Range<Long>, Progression<Long> {
|
||||||
override val increment: Long
|
override val increment: Long
|
||||||
get() = 1
|
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<Float>, Progression<Float> {
|
public class FloatRange(override val start: Float, override val end: Float) : Range<Float>, Progression<Float> {
|
||||||
override val increment: Float
|
override val increment: Float
|
||||||
get() = 1.0f
|
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<Double>, Progression<Double> {
|
public class DoubleRange(override val start: Double, override val end: Double) : Range<Double>, Progression<Double> {
|
||||||
override val increment: Double
|
override val increment: Double
|
||||||
get() = 1.0
|
get() = 1.0
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.lang.reflect.*
|
|||||||
import kotlin.reflect.*
|
import kotlin.reflect.*
|
||||||
|
|
||||||
open class KForeignMemberProperty<T : Any, out R>(
|
open class KForeignMemberProperty<T : Any, out R>(
|
||||||
public override val name: String,
|
override val name: String,
|
||||||
protected val owner: KClassImpl<T>
|
protected val owner: KClassImpl<T>
|
||||||
) : KMemberProperty<T, R>, KPropertyImpl<R> {
|
) : KMemberProperty<T, R>, KPropertyImpl<R> {
|
||||||
override val field: Field = try {
|
override val field: Field = try {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import kotlin.reflect.*
|
|||||||
// TODO: properties of built-in classes
|
// TODO: properties of built-in classes
|
||||||
|
|
||||||
open class KMemberPropertyImpl<T : Any, out R>(
|
open class KMemberPropertyImpl<T : Any, out R>(
|
||||||
public override val name: String,
|
override val name: String,
|
||||||
protected val owner: KClassImpl<T>
|
protected val owner: KClassImpl<T>
|
||||||
) : KMemberProperty<T, R>, KPropertyImpl<R> {
|
) : KMemberProperty<T, R>, KPropertyImpl<R> {
|
||||||
override val field: Field?
|
override val field: Field?
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.lang.reflect.*
|
|||||||
import kotlin.reflect.*
|
import kotlin.reflect.*
|
||||||
|
|
||||||
open class KTopLevelExtensionPropertyImpl<T, out R>(
|
open class KTopLevelExtensionPropertyImpl<T, out R>(
|
||||||
public override val name: String,
|
override val name: String,
|
||||||
protected val owner: KPackageImpl,
|
protected val owner: KPackageImpl,
|
||||||
protected val receiverClass: Class<T>
|
protected val receiverClass: Class<T>
|
||||||
) : KTopLevelExtensionProperty<T, R>, KPropertyImpl<R> {
|
) : KTopLevelExtensionProperty<T, R>, KPropertyImpl<R> {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.lang.reflect.*
|
|||||||
import kotlin.reflect.*
|
import kotlin.reflect.*
|
||||||
|
|
||||||
open class KTopLevelVariableImpl<out R>(
|
open class KTopLevelVariableImpl<out R>(
|
||||||
public override val name: String,
|
override val name: String,
|
||||||
protected val owner: KPackageImpl
|
protected val owner: KPackageImpl
|
||||||
) : KTopLevelVariable<R>, KVariableImpl<R> {
|
) : KTopLevelVariable<R>, KVariableImpl<R> {
|
||||||
// TODO: load the field from the corresponding package part
|
// TODO: load the field from the corresponding package part
|
||||||
|
|||||||
@@ -66,9 +66,9 @@ class GenerateProgressions(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
|||||||
|
|
||||||
out.println(
|
out.println(
|
||||||
"""public class $progression(
|
"""public class $progression(
|
||||||
public override val start: $t,
|
override val start: $t,
|
||||||
public override val end: $t,
|
override val end: $t,
|
||||||
public override val increment: $incrementType
|
override val increment: $incrementType
|
||||||
) : Progression<$t> {
|
) : Progression<$t> {
|
||||||
{
|
{
|
||||||
$constructor
|
$constructor
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class GenerateRanges(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
out.println(
|
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
|
override val increment: $incrementType
|
||||||
get() = $increment
|
get() = $increment
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ trait ImportAwareSearchHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
open class DefaultSearchHelper<T: PsiNamedElement>(
|
open class DefaultSearchHelper<T: PsiNamedElement>(
|
||||||
public override val skipImports: Boolean = false
|
override val skipImports: Boolean = false
|
||||||
): UsagesSearchHelper<T>(), ImportAwareSearchHelper {
|
): UsagesSearchHelper<T>(), ImportAwareSearchHelper {
|
||||||
override fun makeFilter(target: UsagesSearchTarget<T>): UsagesSearchFilter = isTargetUsage and isFilteredImport
|
override fun makeFilter(target: UsagesSearchTarget<T>): UsagesSearchFilter = isTargetUsage and isFilteredImport
|
||||||
}
|
}
|
||||||
@@ -163,8 +163,8 @@ val isExtensionUsage = (PsiReference::isExtensionOfDeclarationClassUsage).search
|
|||||||
class FunctionUsagesSearchHelper(
|
class FunctionUsagesSearchHelper(
|
||||||
public val overloadUsages: Boolean = false,
|
public val overloadUsages: Boolean = false,
|
||||||
public val extensionUsages: Boolean = false,
|
public val extensionUsages: Boolean = false,
|
||||||
public override val selfUsages: Boolean = true,
|
override val selfUsages: Boolean = true,
|
||||||
public override val overrideUsages: Boolean = true,
|
override val overrideUsages: Boolean = true,
|
||||||
skipImports: Boolean = false
|
skipImports: Boolean = false
|
||||||
) : DefaultSearchHelper<JetNamedFunction>(skipImports), OverrideSearchHelper {
|
) : DefaultSearchHelper<JetNamedFunction>(skipImports), OverrideSearchHelper {
|
||||||
override fun makeFilter(target: UsagesSearchTarget<JetNamedFunction>): UsagesSearchFilter {
|
override fun makeFilter(target: UsagesSearchTarget<JetNamedFunction>): UsagesSearchFilter {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ fun PsiNameIdentifierOwner.declarationIdentifier(): Identifier {
|
|||||||
|
|
||||||
class Identifier(
|
class Identifier(
|
||||||
val name: String,
|
val name: String,
|
||||||
public override val isNullable: Boolean = true,
|
override val isNullable: Boolean = true,
|
||||||
private val quotingNeeded: Boolean = true
|
private val quotingNeeded: Boolean = true
|
||||||
) : Expression() {
|
) : Expression() {
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package kotlin
|
package kotlin
|
||||||
|
|
||||||
public class ComparableRange<T: Comparable<T>> (
|
public class ComparableRange<T: Comparable<T>> (
|
||||||
public override val start: T,
|
override val start: T,
|
||||||
public override val end: T
|
override val end: T
|
||||||
): Range<T> {
|
): Range<T> {
|
||||||
override fun contains(item: T): Boolean {
|
override fun contains(item: T): Boolean {
|
||||||
return start <= item && item <= end
|
return start <= item && item <= end
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ abstract class FunctionalList<T>(public val size: Int) {
|
|||||||
get() = throw java.util.NoSuchElementException()
|
get() = throw java.util.NoSuchElementException()
|
||||||
}
|
}
|
||||||
|
|
||||||
class Standard<T>(public override val head: T, public override val tail: FunctionalList<T>) : FunctionalList<T>(tail.size+1)
|
class Standard<T>(override val head: T, override val tail: FunctionalList<T>) : FunctionalList<T>(tail.size+1)
|
||||||
|
|
||||||
public fun <T> emptyList() : FunctionalList<T> = Empty<T>()
|
public fun <T> emptyList() : FunctionalList<T> = Empty<T>()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user