diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/collections/KotlinCollectionsTypeExtractor.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/collections/KotlinCollectionsTypeExtractor.kt index 16255b4f198..c0436dc51b9 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/collections/KotlinCollectionsTypeExtractor.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/collections/KotlinCollectionsTypeExtractor.kt @@ -5,9 +5,9 @@ import com.intellij.debugger.streams.trace.impl.handler.type.GenericType import com.intellij.openapi.diagnostic.Logger import org.jetbrains.kotlin.idea.debugger.sequence.psi.CallTypeExtractor import org.jetbrains.kotlin.idea.debugger.sequence.psi.KotlinPsiUtil -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes.ANY -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes.NULLABLE_ANY +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes.ANY +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes.NULLABLE_ANY import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.typeUtil.supertypes @@ -24,7 +24,7 @@ class KotlinCollectionsTypeExtractor : CallTypeExtractor.Base() { override fun getResultType(type: KotlinType): GenericType { val typeName = KotlinPsiUtil.getTypeWithoutTypeParameters(type) - return KotlinTypes.primitiveTypeByName(typeName) ?: KotlinTypes.primitiveArrayByName(typeName) ?: getAny(type) + return KotlinSequenceTypes.primitiveTypeByName(typeName) ?: KotlinSequenceTypes.primitiveArrayByName(typeName) ?: getAny(type) } private fun tryToFindElementType(type: KotlinType): GenericType? { @@ -33,13 +33,13 @@ class KotlinCollectionsTypeExtractor : CallTypeExtractor.Base() { if (type.arguments.isEmpty()) return NULLABLE_ANY val itemsType = type.arguments.first().type if (itemsType.isMarkedNullable) return NULLABLE_ANY - val primitiveType = KotlinTypes.primitiveTypeByName(KotlinPsiUtil.getTypeWithoutTypeParameters(itemsType)) + val primitiveType = KotlinSequenceTypes.primitiveTypeByName(KotlinPsiUtil.getTypeWithoutTypeParameters(itemsType)) return primitiveType ?: ANY } - if (typeName == "kotlin.String" || typeName == "kotlin.CharSequence") return KotlinTypes.CHAR + if (typeName == "kotlin.String" || typeName == "kotlin.CharSequence") return KotlinSequenceTypes.CHAR - val primitiveArray = KotlinTypes.primitiveArrayByName(typeName) + val primitiveArray = KotlinSequenceTypes.primitiveArrayByName(typeName) if (primitiveArray != null) return primitiveArray.elementType return type.supertypes().asSequence() diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/java/JavaStreamChainTypeExtractor.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/java/JavaStreamChainTypeExtractor.kt index dd76e9c574b..10fc270e233 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/java/JavaStreamChainTypeExtractor.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/java/JavaStreamChainTypeExtractor.kt @@ -6,21 +6,21 @@ import com.intellij.debugger.streams.trace.impl.handler.type.GenericType import com.intellij.psi.CommonClassNames import org.jetbrains.kotlin.idea.debugger.sequence.psi.CallTypeExtractor import org.jetbrains.kotlin.idea.debugger.sequence.psi.KotlinPsiUtil -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.typeUtil.getImmediateSuperclassNotAny class JavaStreamChainTypeExtractor : CallTypeExtractor.Base() { override fun extractItemsType(type: KotlinType?): GenericType { if (type == null) { - return KotlinTypes.NULLABLE_ANY + return KotlinSequenceTypes.NULLABLE_ANY } return when (KotlinPsiUtil.getTypeWithoutTypeParameters(type)) { - CommonClassNames.JAVA_UTIL_STREAM_INT_STREAM -> KotlinTypes.INT - CommonClassNames.JAVA_UTIL_STREAM_DOUBLE_STREAM -> KotlinTypes.DOUBLE - CommonClassNames.JAVA_UTIL_STREAM_LONG_STREAM -> KotlinTypes.LONG - CommonClassNames.JAVA_UTIL_STREAM_BASE_STREAM -> KotlinTypes.NULLABLE_ANY + CommonClassNames.JAVA_UTIL_STREAM_INT_STREAM -> KotlinSequenceTypes.INT + CommonClassNames.JAVA_UTIL_STREAM_DOUBLE_STREAM -> KotlinSequenceTypes.DOUBLE + CommonClassNames.JAVA_UTIL_STREAM_LONG_STREAM -> KotlinSequenceTypes.LONG + CommonClassNames.JAVA_UTIL_STREAM_BASE_STREAM -> KotlinSequenceTypes.NULLABLE_ANY else -> extractItemsType(type.getImmediateSuperclassNotAny()) } } diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/sequence/SequenceTypeExtractor.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/sequence/SequenceTypeExtractor.kt index 55b4d82c6b9..68ce1b3830a 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/sequence/SequenceTypeExtractor.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/psi/sequence/SequenceTypeExtractor.kt @@ -6,7 +6,7 @@ import com.intellij.debugger.streams.trace.impl.handler.type.GenericType import com.intellij.openapi.diagnostic.Logger import org.jetbrains.kotlin.idea.debugger.sequence.psi.CallTypeExtractor import org.jetbrains.kotlin.idea.debugger.sequence.psi.KotlinPsiUtil -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.typeUtil.supertypes @@ -16,26 +16,26 @@ class SequenceTypeExtractor : CallTypeExtractor.Base() { } override fun extractItemsType(type: KotlinType?): GenericType { - if (type == null) return KotlinTypes.NULLABLE_ANY + if (type == null) return KotlinSequenceTypes.NULLABLE_ANY return tryToFindElementType(type) ?: defaultType(type) } override fun getResultType(type: KotlinType): GenericType { val typeName = KotlinPsiUtil.getTypeWithoutTypeParameters(type) - return KotlinTypes.primitiveTypeByName(typeName) - ?: KotlinTypes.primitiveArrayByName(typeName) + return KotlinSequenceTypes.primitiveTypeByName(typeName) + ?: KotlinSequenceTypes.primitiveArrayByName(typeName) ?: ClassTypeImpl(KotlinPsiUtil.getTypeName(type)) } private fun tryToFindElementType(type: KotlinType): GenericType? { val typeName = KotlinPsiUtil.getTypeWithoutTypeParameters(type) if (typeName == "kotlin.sequences.Sequence") { - if (type.arguments.isEmpty()) return KotlinTypes.NULLABLE_ANY + if (type.arguments.isEmpty()) return KotlinSequenceTypes.NULLABLE_ANY val itemsType = type.arguments.single().type - if (itemsType.isMarkedNullable) return KotlinTypes.NULLABLE_ANY - val primitiveType = KotlinTypes.primitiveTypeByName(KotlinPsiUtil.getTypeWithoutTypeParameters(itemsType)) - return primitiveType ?: KotlinTypes.ANY + if (itemsType.isMarkedNullable) return KotlinSequenceTypes.NULLABLE_ANY + val primitiveType = KotlinSequenceTypes.primitiveTypeByName(KotlinPsiUtil.getTypeWithoutTypeParameters(itemsType)) + return primitiveType ?: KotlinSequenceTypes.ANY } return type.supertypes().asSequence() @@ -45,6 +45,6 @@ class SequenceTypeExtractor : CallTypeExtractor.Base() { private fun defaultType(type: KotlinType): GenericType { LOG.warn("Could not find type of items for type ${KotlinPsiUtil.getTypeName(type)}") - return if (type.isMarkedNullable) KotlinTypes.NULLABLE_ANY else KotlinTypes.ANY + return if (type.isMarkedNullable) KotlinSequenceTypes.NULLABLE_ANY else KotlinSequenceTypes.ANY } } \ No newline at end of file diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/dsl/KotlinTypes.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/dsl/KotlinSequenceTypes.kt similarity index 99% rename from idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/dsl/KotlinTypes.kt rename to idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/dsl/KotlinSequenceTypes.kt index 75c069c8e84..92724667e09 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/dsl/KotlinTypes.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/dsl/KotlinSequenceTypes.kt @@ -5,7 +5,7 @@ import com.intellij.debugger.streams.trace.dsl.Types import com.intellij.debugger.streams.trace.impl.handler.type.* import org.jetbrains.kotlin.builtins.KotlinBuiltIns.FQ_NAMES -object KotlinTypes : Types { +object KotlinSequenceTypes : Types { override val ANY: GenericType = ClassTypeImpl(FQ_NAMES.any.asString(), "kotlin.Any()") override val BOOLEAN: GenericType = ClassTypeImpl(FQ_NAMES._boolean.asString(), "false") diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/dsl/KotlinStatementFactory.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/dsl/KotlinStatementFactory.kt index 7cd779e25d1..01f2a2dd7df 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/dsl/KotlinStatementFactory.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/dsl/KotlinStatementFactory.kt @@ -17,7 +17,7 @@ class KotlinStatementFactory(private val peekCallFactory: PeekCallFactory) : Sta override fun not(expression: Expression): Expression = TextExpression("!${expression.toCode()}") - override val types: Types = KotlinTypes + override val types: Types = KotlinSequenceTypes override fun createEmptyCompositeCodeBlock(): CompositeCodeBlock = KotlinCodeBlock(this) @@ -85,12 +85,12 @@ class KotlinStatementFactory(private val peekCallFactory: PeekCallFactory) : Sta val arguments = args.joinToString { it.toCode() } val text = when (elementType) { types.BOOLEAN -> "kotlin.booleanArrayOf($arguments)" - KotlinTypes.BYTE -> "kotlin.byteArrayOf($arguments)" - KotlinTypes.SHORT -> "kotlin.shortArrayOf($arguments)" - KotlinTypes.CHAR -> "kotlin.charArrayOf($arguments)" + KotlinSequenceTypes.BYTE -> "kotlin.byteArrayOf($arguments)" + KotlinSequenceTypes.SHORT -> "kotlin.shortArrayOf($arguments)" + KotlinSequenceTypes.CHAR -> "kotlin.charArrayOf($arguments)" types.INT -> "kotlin.intArrayOf($arguments)" types.LONG -> "kotlin.longArrayOf($arguments)" - KotlinTypes.FLOAT -> "kotlin.floatArrayOf($arguments)" + KotlinSequenceTypes.FLOAT -> "kotlin.floatArrayOf($arguments)" types.DOUBLE -> "kotlin.doubleArrayOf($arguments)" else -> "kotlin.arrayOf<${types.nullable { elementType }.genericTypeName}>($arguments)" } diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/CallUtils.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/CallUtils.kt index 2f869dc83a7..49e439c59e1 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/CallUtils.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/CallUtils.kt @@ -4,7 +4,7 @@ package org.jetbrains.kotlin.idea.debugger.sequence.trace.impl.handler import com.intellij.debugger.streams.wrapper.* import com.intellij.debugger.streams.wrapper.impl.IntermediateStreamCallImpl import com.intellij.debugger.streams.wrapper.impl.TerminatorStreamCallImpl -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes fun IntermediateStreamCall.withArgs(args: List) = IntermediateStreamCallImpl(name, args, typeBefore, typeAfter, textRange) @@ -13,7 +13,7 @@ fun TerminatorStreamCall.withArgs(args: List) = TerminatorStreamCallImpl(name, args, typeBefore, resultType, textRange) fun StreamCall.typeBefore() = - if (StreamCall@ this is TypeBeforeAware) StreamCall@ this.typeBefore else KotlinTypes.ANY + if (StreamCall@ this is TypeBeforeAware) StreamCall@ this.typeBefore else KotlinSequenceTypes.ANY fun StreamCall.typeAfter() = - if (StreamCall@ this is TypeAfterAware) StreamCall@ this.typeAfter else KotlinTypes.ANY \ No newline at end of file + if (StreamCall@ this is TypeAfterAware) StreamCall@ this.typeAfter else KotlinSequenceTypes.ANY \ No newline at end of file diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/OnEachCall.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/OnEachCall.kt index 79347bc4a3a..07525c555d1 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/OnEachCall.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/OnEachCall.kt @@ -7,13 +7,13 @@ import com.intellij.debugger.streams.wrapper.IntermediateStreamCall import com.intellij.debugger.streams.wrapper.StreamCallType import com.intellij.debugger.streams.wrapper.impl.CallArgumentImpl import com.intellij.openapi.util.TextRange -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes class OnEachCall(private val elementsType: GenericType, lambda: String) : IntermediateStreamCall { private val args: List init { - args = listOf(CallArgumentImpl(KotlinTypes.ANY.genericTypeName, lambda)) + args = listOf(CallArgumentImpl(KotlinSequenceTypes.ANY.genericTypeName, lambda)) } override fun getArguments(): List = args diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/sequence/FilterIsInstanceHandler.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/sequence/FilterIsInstanceHandler.kt index be067863acd..edc2add22bc 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/sequence/FilterIsInstanceHandler.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/sequence/FilterIsInstanceHandler.kt @@ -12,7 +12,7 @@ import com.intellij.debugger.streams.wrapper.IntermediateStreamCall import com.intellij.debugger.streams.wrapper.impl.CallArgumentImpl import com.intellij.debugger.streams.wrapper.impl.IntermediateStreamCallImpl import com.intellij.openapi.util.TextRange.EMPTY_RANGE -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes class FilterIsInstanceHandler(num: Int, call: IntermediateStreamCall, dsl: Dsl) : HandlerBase.Intermediate(dsl) { private companion object { @@ -56,7 +56,7 @@ class FilterIsInstanceHandler(num: Int, call: IntermediateStreamCall, dsl: Dsl) override fun transformCall(call: IntermediateStreamCall): IntermediateStreamCall { val typeAfter = call.typeAfter.genericTypeName - val predicateType = functionalType(typeAfter, KotlinTypes.BOOLEAN.genericTypeName) + val predicateType = functionalType(typeAfter, KotlinSequenceTypes.BOOLEAN.genericTypeName) val predicate = CallArgumentImpl(predicateType, " { x -> x is $typeAfter} ") return syntheticFilterCall(predicate) } diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/sequence/KotlinDistinctByHandler.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/sequence/KotlinDistinctByHandler.kt index c9528e84433..af28dc0d382 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/sequence/KotlinDistinctByHandler.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/sequence/trace/impl/handler/sequence/KotlinDistinctByHandler.kt @@ -10,7 +10,7 @@ import com.intellij.debugger.streams.wrapper.CallArgument import com.intellij.debugger.streams.wrapper.IntermediateStreamCall import com.intellij.debugger.streams.wrapper.impl.CallArgumentImpl import com.intellij.debugger.streams.wrapper.impl.IntermediateStreamCallImpl -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes /** * Based on com.intellij.debugger.streams.trace.impl.handler.unified.DistinctByKeyHandler @@ -26,7 +26,7 @@ class KotlinDistinctByHandler(callNumber: Int, private val call: IntermediateStr private val extractorVariable: Variable private val beforeTimes = dsl.list(dsl.types.INT, call.name + callNumber + "BeforeTimes") private val beforeValues = dsl.list(call.typeBefore, call.name + callNumber + "BeforeValues") - private val keys = dsl.list(KotlinTypes.NULLABLE_ANY, call.name + callNumber + "Keys") + private val keys = dsl.list(KotlinSequenceTypes.NULLABLE_ANY, call.name + callNumber + "Keys") private val time2ValueAfter = dsl.linkedMap(dsl.types.INT, call.typeAfter, call.name + callNumber + "after") init { @@ -50,7 +50,7 @@ class KotlinDistinctByHandler(callNumber: Int, private val call: IntermediateStr override fun transformCall(call: IntermediateStreamCall): IntermediateStreamCall { val newKeyExtractor = dsl.lambda("x") { - val key = dsl.variable(KotlinTypes.NULLABLE_ANY, "key") + val key = dsl.variable(KotlinSequenceTypes.NULLABLE_ANY, "key") declare(key, extractorVariable.call("invoke", lambdaArg), false) statement { beforeTimes.add(dsl.currentTime()) } statement { beforeValues.add(lambdaArg) } @@ -61,7 +61,7 @@ class KotlinDistinctByHandler(callNumber: Int, private val call: IntermediateStr } override fun prepareResult(): CodeBlock { - val keys2TimesBefore = dsl.map(KotlinTypes.NULLABLE_ANY, dsl.types.list(dsl.types.INT), "keys2Times") + val keys2TimesBefore = dsl.map(KotlinSequenceTypes.NULLABLE_ANY, dsl.types.list(dsl.types.INT), "keys2Times") val transitions = dsl.map(dsl.types.INT, dsl.types.INT, "transitionsMap") return dsl.block { add(peekHandler.prepareResult()) @@ -69,7 +69,7 @@ class KotlinDistinctByHandler(callNumber: Int, private val call: IntermediateStr declare(transitions.defaultDeclaration()) integerIteration(keys.size(), block@ this) { - val key = declare(variable(KotlinTypes.NULLABLE_ANY, "key"), keys.get(loopVariable), false) + val key = declare(variable(KotlinSequenceTypes.NULLABLE_ANY, "key"), keys.get(loopVariable), false) val lst = list(dsl.types.INT, "lst") declare(lst, keys2TimesBefore.computeIfAbsent(key, lambda("k") { doReturn(newList(types.INT)) @@ -80,7 +80,7 @@ class KotlinDistinctByHandler(callNumber: Int, private val call: IntermediateStr forEachLoop(variable(types.INT, "afterTime"), time2ValueAfter.keys()) { val afterTime = loopVariable val valueAfter = declare(variable(call.typeAfter, "valueAfter"), time2ValueAfter.get(loopVariable), false) - val key = declare(variable(KotlinTypes.NULLABLE_ANY, "key"), nullExpression, true) + val key = declare(variable(KotlinSequenceTypes.NULLABLE_ANY, "key"), nullExpression, true) integerIteration(beforeTimes.size(), forEachLoop@ this) { ifBranch((valueAfter same beforeValues.get(loopVariable)) and !transitions.contains(beforeTimes.get(loopVariable))) { key assign keys.get(loopVariable) diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/collection/TypedCollectionChainTest.kt b/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/collection/TypedCollectionChainTest.kt index 9de1c0b4bf5..ceebecd93db 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/collection/TypedCollectionChainTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/collection/TypedCollectionChainTest.kt @@ -4,47 +4,47 @@ package org.jetbrains.kotlin.idea.debugger.sequence.psi.collection import com.intellij.debugger.streams.wrapper.StreamChainBuilder import org.jetbrains.kotlin.idea.debugger.sequence.lib.collections.KotlinCollectionSupportProvider import org.jetbrains.kotlin.idea.debugger.sequence.psi.TypedChainTestCase -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes class TypedCollectionChainTest : TypedChainTestCase("collection/positive/types") { override val kotlinChainBuilder: StreamChainBuilder = KotlinCollectionSupportProvider().chainBuilder - fun testAny() = doTest(KotlinTypes.ANY) - fun testNullableAny() = doTest(KotlinTypes.NULLABLE_ANY) + fun testAny() = doTest(KotlinSequenceTypes.ANY) + fun testNullableAny() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testBoolean() = doTest(KotlinTypes.BOOLEAN) - fun testNullableBoolean() = doTest(KotlinTypes.NULLABLE_ANY) + fun testBoolean() = doTest(KotlinSequenceTypes.BOOLEAN) + fun testNullableBoolean() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testByte() = doTest(KotlinTypes.BYTE) - fun testNullableByte() = doTest(KotlinTypes.NULLABLE_ANY) + fun testByte() = doTest(KotlinSequenceTypes.BYTE) + fun testNullableByte() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testShort() = doTest(KotlinTypes.SHORT) - fun testNullableShort() = doTest(KotlinTypes.NULLABLE_ANY) + fun testShort() = doTest(KotlinSequenceTypes.SHORT) + fun testNullableShort() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testInt() = doTest(KotlinTypes.INT) - fun testNullableInt() = doTest(KotlinTypes.NULLABLE_ANY) + fun testInt() = doTest(KotlinSequenceTypes.INT) + fun testNullableInt() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testLong() = doTest(KotlinTypes.LONG) - fun testNullableLong() = doTest(KotlinTypes.NULLABLE_ANY) + fun testLong() = doTest(KotlinSequenceTypes.LONG) + fun testNullableLong() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testFloat() = doTest(KotlinTypes.FLOAT) - fun testNullableFloat() = doTest(KotlinTypes.NULLABLE_ANY) + fun testFloat() = doTest(KotlinSequenceTypes.FLOAT) + fun testNullableFloat() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testDouble() = doTest(KotlinTypes.DOUBLE) - fun testNullableDouble() = doTest(KotlinTypes.NULLABLE_ANY) + fun testDouble() = doTest(KotlinSequenceTypes.DOUBLE) + fun testNullableDouble() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testChar() = doTest(KotlinTypes.CHAR) - fun testNullableChar() = doTest(KotlinTypes.NULLABLE_ANY) + fun testChar() = doTest(KotlinSequenceTypes.CHAR) + fun testNullableChar() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testNullableAnyToPrimitive() = doTest(KotlinTypes.NULLABLE_ANY, KotlinTypes.BOOLEAN) - fun testPrimitiveToNullableAny() = doTest(KotlinTypes.INT, KotlinTypes.NULLABLE_ANY) + fun testNullableAnyToPrimitive() = doTest(KotlinSequenceTypes.NULLABLE_ANY, KotlinSequenceTypes.BOOLEAN) + fun testPrimitiveToNullableAny() = doTest(KotlinSequenceTypes.INT, KotlinSequenceTypes.NULLABLE_ANY) - fun testAnyToPrimitive() = doTest(KotlinTypes.ANY, KotlinTypes.INT) - fun testPrimitiveToAny() = doTest(KotlinTypes.INT, KotlinTypes.ANY) + fun testAnyToPrimitive() = doTest(KotlinSequenceTypes.ANY, KotlinSequenceTypes.INT) + fun testPrimitiveToAny() = doTest(KotlinSequenceTypes.INT, KotlinSequenceTypes.ANY) - fun testNullableToNotNull() = doTest(KotlinTypes.NULLABLE_ANY, KotlinTypes.INT) - fun testNotNullToNullable() = doTest(KotlinTypes.DOUBLE, KotlinTypes.NULLABLE_ANY) + fun testNullableToNotNull() = doTest(KotlinSequenceTypes.NULLABLE_ANY, KotlinSequenceTypes.INT) + fun testNotNullToNullable() = doTest(KotlinSequenceTypes.DOUBLE, KotlinSequenceTypes.NULLABLE_ANY) - fun testFewTransitions1() = doTest(KotlinTypes.BYTE, KotlinTypes.ANY, KotlinTypes.NULLABLE_ANY, KotlinTypes.INT) - fun testFewTransitions2() = doTest(KotlinTypes.CHAR, KotlinTypes.BOOLEAN, KotlinTypes.DOUBLE, KotlinTypes.ANY) + fun testFewTransitions1() = doTest(KotlinSequenceTypes.BYTE, KotlinSequenceTypes.ANY, KotlinSequenceTypes.NULLABLE_ANY, KotlinSequenceTypes.INT) + fun testFewTransitions2() = doTest(KotlinSequenceTypes.CHAR, KotlinSequenceTypes.BOOLEAN, KotlinSequenceTypes.DOUBLE, KotlinSequenceTypes.ANY) } \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/java/TypedJavaChainTest.kt b/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/java/TypedJavaChainTest.kt index 39a4a5f09c8..61390ec136b 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/java/TypedJavaChainTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/java/TypedJavaChainTest.kt @@ -4,10 +4,10 @@ package org.jetbrains.kotlin.idea.debugger.sequence.psi.java import com.intellij.debugger.streams.wrapper.StreamChainBuilder import org.jetbrains.kotlin.idea.debugger.sequence.lib.java.JavaStandardLibrarySupportProvider import org.jetbrains.kotlin.idea.debugger.sequence.psi.TypedChainTestCase -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes.DOUBLE -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes.INT -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes.LONG -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes.NULLABLE_ANY +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes.DOUBLE +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes.INT +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes.LONG +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes.NULLABLE_ANY class TypedJavaChainTest : TypedChainTestCase("streams/positive/types") { override val kotlinChainBuilder: StreamChainBuilder = JavaStandardLibrarySupportProvider().chainBuilder diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/sequence/TypedSequenceChain.kt b/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/sequence/TypedSequenceChain.kt index 5ddb95a3af2..6ee616dd8ef 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/sequence/TypedSequenceChain.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/sequence/psi/sequence/TypedSequenceChain.kt @@ -4,48 +4,48 @@ package org.jetbrains.kotlin.idea.debugger.sequence.psi.sequence import com.intellij.debugger.streams.wrapper.StreamChainBuilder import org.jetbrains.kotlin.idea.debugger.sequence.lib.sequence.KotlinSequenceSupportProvider import org.jetbrains.kotlin.idea.debugger.sequence.psi.TypedChainTestCase -import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes +import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes class TypedSequenceChain : TypedChainTestCase("sequence/positive/types") { override val kotlinChainBuilder: StreamChainBuilder = KotlinSequenceSupportProvider().chainBuilder - fun testAny() = doTest(KotlinTypes.ANY) - fun testNullableAny() = doTest(KotlinTypes.NULLABLE_ANY) + fun testAny() = doTest(KotlinSequenceTypes.ANY) + fun testNullableAny() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testBoolean() = doTest(KotlinTypes.BOOLEAN) - fun testNullableBoolean() = doTest(KotlinTypes.NULLABLE_ANY) + fun testBoolean() = doTest(KotlinSequenceTypes.BOOLEAN) + fun testNullableBoolean() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testByte() = doTest(KotlinTypes.BYTE) - fun testNullableByte() = doTest(KotlinTypes.NULLABLE_ANY) + fun testByte() = doTest(KotlinSequenceTypes.BYTE) + fun testNullableByte() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testShort() = doTest(KotlinTypes.SHORT) - fun testNullableShort() = doTest(KotlinTypes.NULLABLE_ANY) + fun testShort() = doTest(KotlinSequenceTypes.SHORT) + fun testNullableShort() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testInt() = doTest(KotlinTypes.INT) - fun testNullableInt() = doTest(KotlinTypes.NULLABLE_ANY) + fun testInt() = doTest(KotlinSequenceTypes.INT) + fun testNullableInt() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testLong() = doTest(KotlinTypes.LONG) - fun testNullableLong() = doTest(KotlinTypes.NULLABLE_ANY) + fun testLong() = doTest(KotlinSequenceTypes.LONG) + fun testNullableLong() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testFloat() = doTest(KotlinTypes.FLOAT) - fun testNullableFloat() = doTest(KotlinTypes.NULLABLE_ANY) + fun testFloat() = doTest(KotlinSequenceTypes.FLOAT) + fun testNullableFloat() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testDouble() = doTest(KotlinTypes.DOUBLE) - fun testNullableDouble() = doTest(KotlinTypes.NULLABLE_ANY) + fun testDouble() = doTest(KotlinSequenceTypes.DOUBLE) + fun testNullableDouble() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testChar() = doTest(KotlinTypes.CHAR) - fun testNullableChar() = doTest(KotlinTypes.NULLABLE_ANY) + fun testChar() = doTest(KotlinSequenceTypes.CHAR) + fun testNullableChar() = doTest(KotlinSequenceTypes.NULLABLE_ANY) - fun testNullableAnyToPrimitive() = doTest(KotlinTypes.NULLABLE_ANY, KotlinTypes.BOOLEAN) - fun testPrimitiveToNullableAny() = doTest(KotlinTypes.INT, KotlinTypes.NULLABLE_ANY) + fun testNullableAnyToPrimitive() = doTest(KotlinSequenceTypes.NULLABLE_ANY, KotlinSequenceTypes.BOOLEAN) + fun testPrimitiveToNullableAny() = doTest(KotlinSequenceTypes.INT, KotlinSequenceTypes.NULLABLE_ANY) - fun testAnyToPrimitive() = doTest(KotlinTypes.ANY, KotlinTypes.INT) - fun testPrimitiveToAny() = doTest(KotlinTypes.INT, KotlinTypes.ANY) + fun testAnyToPrimitive() = doTest(KotlinSequenceTypes.ANY, KotlinSequenceTypes.INT) + fun testPrimitiveToAny() = doTest(KotlinSequenceTypes.INT, KotlinSequenceTypes.ANY) - fun testNullableToNotNull() = doTest(KotlinTypes.NULLABLE_ANY, KotlinTypes.INT) - fun testNotNullToNullable() = doTest(KotlinTypes.DOUBLE, KotlinTypes.NULLABLE_ANY) + fun testNullableToNotNull() = doTest(KotlinSequenceTypes.NULLABLE_ANY, KotlinSequenceTypes.INT) + fun testNotNullToNullable() = doTest(KotlinSequenceTypes.DOUBLE, KotlinSequenceTypes.NULLABLE_ANY) - fun testFewTransitions1() = doTest(KotlinTypes.BYTE, KotlinTypes.ANY, KotlinTypes.NULLABLE_ANY, KotlinTypes.INT) - fun testFewTransitions2() = doTest(KotlinTypes.CHAR, KotlinTypes.BOOLEAN, KotlinTypes.DOUBLE, KotlinTypes.ANY) + fun testFewTransitions1() = doTest(KotlinSequenceTypes.BYTE, KotlinSequenceTypes.ANY, KotlinSequenceTypes.NULLABLE_ANY, KotlinSequenceTypes.INT) + fun testFewTransitions2() = doTest(KotlinSequenceTypes.CHAR, KotlinSequenceTypes.BOOLEAN, KotlinSequenceTypes.DOUBLE, KotlinSequenceTypes.ANY) }