Enum warnings fixed: deprecated delimiters, short super constructors, both in project and in libraries
This commit is contained in:
@@ -21,8 +21,8 @@ import org.jetbrains.org.objectweb.asm.tree.LabelNode
|
||||
import org.jetbrains.kotlin.codegen.inline.InlineCodegenUtil.*
|
||||
|
||||
enum class TryCatchPosition {
|
||||
START
|
||||
END
|
||||
START,
|
||||
END,
|
||||
INNER
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import kotlin.properties.Delegates
|
||||
|
||||
public data class JavaRoot(public val file: VirtualFile, public val type: JavaRoot.RootType) {
|
||||
public enum class RootType {
|
||||
SOURCE
|
||||
SOURCE,
|
||||
BINARY
|
||||
}
|
||||
|
||||
|
||||
+8
-8
@@ -27,18 +27,18 @@ import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOriginKind.*
|
||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
|
||||
import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils
|
||||
|
||||
public enum class MemberKind { FIELD METHOD }
|
||||
public enum class MemberKind { FIELD, METHOD }
|
||||
|
||||
public data class RawSignature(public val name: String, public val desc: String, public val kind: MemberKind)
|
||||
|
||||
public enum class JvmDeclarationOriginKind {
|
||||
OTHER
|
||||
PACKAGE_FACADE
|
||||
PACKAGE_PART
|
||||
TRAIT_IMPL
|
||||
DELEGATION_TO_TRAIT_IMPL
|
||||
DELEGATION
|
||||
BRIDGE
|
||||
OTHER,
|
||||
PACKAGE_FACADE,
|
||||
PACKAGE_PART,
|
||||
TRAIT_IMPL,
|
||||
DELEGATION_TO_TRAIT_IMPL,
|
||||
DELEGATION,
|
||||
BRIDGE,
|
||||
SYNTHETIC // this means that there's no proper descriptor for this jvm declaration
|
||||
}
|
||||
|
||||
|
||||
@@ -102,12 +102,12 @@ public trait ModuleInfo {
|
||||
override fun adjustDependencies(builtinsModule: ModuleDescriptorImpl, dependencies: MutableList<ModuleDescriptorImpl>) {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
},
|
||||
LAST {
|
||||
override fun adjustDependencies(builtinsModule: ModuleDescriptorImpl, dependencies: MutableList<ModuleDescriptorImpl>) {
|
||||
dependencies.add(builtinsModule)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
override fun adjustDependencies(builtinsModule: ModuleDescriptorImpl, dependencies: MutableList<ModuleDescriptorImpl>) {
|
||||
//TODO: KT-5457
|
||||
|
||||
@@ -190,7 +190,7 @@ public fun traverseFollowingInstructions(
|
||||
}
|
||||
|
||||
public enum class TraversalOrder {
|
||||
FORWARD
|
||||
FORWARD,
|
||||
BACKWARD
|
||||
}
|
||||
|
||||
|
||||
+15
-15
@@ -132,23 +132,23 @@ public class MagicInstruction(
|
||||
|
||||
public enum class MagicKind(val sideEffectFree: Boolean = false) {
|
||||
// builtin operations
|
||||
STRING_TEMPLATE: MagicKind(true)
|
||||
AND: MagicKind(true)
|
||||
OR: MagicKind(true)
|
||||
NOT_NULL_ASSERTION: MagicKind()
|
||||
EQUALS_IN_WHEN_CONDITION: MagicKind()
|
||||
IS: MagicKind()
|
||||
CAST: MagicKind()
|
||||
CALLABLE_REFERENCE: MagicKind(true)
|
||||
STRING_TEMPLATE(true),
|
||||
AND(true),
|
||||
OR(true),
|
||||
NOT_NULL_ASSERTION(),
|
||||
EQUALS_IN_WHEN_CONDITION(),
|
||||
IS(),
|
||||
CAST(),
|
||||
CALLABLE_REFERENCE(true),
|
||||
// implicit operations
|
||||
LOOP_RANGE_ITERATION: MagicKind()
|
||||
IMPLICIT_RECEIVER: MagicKind()
|
||||
VALUE_CONSUMER: MagicKind()
|
||||
LOOP_RANGE_ITERATION(),
|
||||
IMPLICIT_RECEIVER(),
|
||||
VALUE_CONSUMER(),
|
||||
// unrecognized operations
|
||||
UNRESOLVED_CALL: MagicKind()
|
||||
UNSUPPORTED_ELEMENT: MagicKind()
|
||||
UNRECOGNIZED_WRITE_RHS: MagicKind()
|
||||
FAKE_INITIALIZER: MagicKind()
|
||||
UNRESOLVED_CALL(),
|
||||
UNSUPPORTED_ELEMENT(),
|
||||
UNRECOGNIZED_WRITE_RHS(),
|
||||
FAKE_INITIALIZER()
|
||||
}
|
||||
|
||||
// Merges values produced by alternative control-flow paths (such as 'if' branches)
|
||||
|
||||
@@ -374,18 +374,18 @@ public class JetPsiFactory(private val project: Project) {
|
||||
|
||||
public class CallableBuilder(private val target: Target) {
|
||||
public enum class Target {
|
||||
FUNCTION
|
||||
FUNCTION,
|
||||
READ_ONLY_PROPERTY
|
||||
}
|
||||
|
||||
enum class State {
|
||||
MODIFIERS
|
||||
NAME
|
||||
RECEIVER
|
||||
FIRST_PARAM
|
||||
REST_PARAMS
|
||||
TYPE_CONSTRAINTS
|
||||
BODY
|
||||
MODIFIERS,
|
||||
NAME,
|
||||
RECEIVER,
|
||||
FIRST_PARAM,
|
||||
REST_PARAMS,
|
||||
TYPE_CONSTRAINTS,
|
||||
BODY,
|
||||
DONE
|
||||
}
|
||||
|
||||
|
||||
@@ -27,13 +27,13 @@ public object ArgumentUnmapped: ArgumentMapping {
|
||||
}
|
||||
|
||||
public enum class ArgumentMatchStatus(val isError: Boolean = true) {
|
||||
SUCCESS : ArgumentMatchStatus(false)
|
||||
TYPE_MISMATCH : ArgumentMatchStatus()
|
||||
ARGUMENT_HAS_NO_TYPE : ArgumentMatchStatus()
|
||||
SUCCESS(false),
|
||||
TYPE_MISMATCH(),
|
||||
ARGUMENT_HAS_NO_TYPE(),
|
||||
|
||||
// The case when there is no type mismatch, but parameter has uninferred types:
|
||||
// fun <T> foo(l: List<T>) {}; val l = foo(emptyList())
|
||||
MATCH_MODULO_UNINFERRED_TYPES : ArgumentMatchStatus()
|
||||
MATCH_MODULO_UNINFERRED_TYPES()
|
||||
}
|
||||
|
||||
public trait ArgumentMatch : ArgumentMapping {
|
||||
|
||||
@@ -226,8 +226,8 @@ class LazyImportScope(
|
||||
) : JetScope {
|
||||
|
||||
enum class FilteringKind {
|
||||
ALL
|
||||
VISIBLE_CLASSES
|
||||
ALL,
|
||||
VISIBLE_CLASSES,
|
||||
INVISIBLE_CLASSES
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ import org.jetbrains.kotlin.name.Name
|
||||
|
||||
public trait WritableScope : JetScope {
|
||||
public enum class LockLevel {
|
||||
WRITING
|
||||
BOTH
|
||||
WRITING,
|
||||
BOTH,
|
||||
READING
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ abstract public class AbstractConstraintSystemTest() : JetLiteFixture() {
|
||||
|
||||
class MyConstraint(val kind: MyConstraintKind, val firstType: String, val secondType: String, val isWeak: Boolean)
|
||||
enum class MyConstraintKind {
|
||||
SUBTYPE SUPERTYPE
|
||||
SUBTYPE, SUPERTYPE
|
||||
}
|
||||
|
||||
private fun parseVariables(text: String): List<String> {
|
||||
|
||||
Reference in New Issue
Block a user