Add test for obsolete issue
#KT-38667 Obsolete
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
abstract class AnimationVector
|
||||
class AnimationVector1D : AnimationVector()
|
||||
interface PropKey<T, V : AnimationVector>
|
||||
class IntPropKey : PropKey<Int, AnimationVector1D>
|
||||
abstract class AnimationBuilder<T>
|
||||
abstract class DurationBasedAnimationBuilder<T> : AnimationBuilder<T>()
|
||||
class TweenBuilder<T> : DurationBasedAnimationBuilder<T>()
|
||||
class TransitionSpec<S> {
|
||||
fun <T> tween(init: TweenBuilder<T>.() -> Unit): DurationBasedAnimationBuilder<T> = TweenBuilder<T>().apply(init)
|
||||
infix fun <T, V : AnimationVector> PropKey<T, V>.using(builder: AnimationBuilder<T>) {}
|
||||
}
|
||||
class TransitionDefinition<T> {
|
||||
fun transition(fromState: T? = null, toState: T? = null, init: TransitionSpec<T>.() -> Unit) {}
|
||||
}
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> transitionDefinition(@BuilderInference init: TransitionDefinition<T>.() -> Unit) = TransitionDefinition<T>().apply(init)
|
||||
|
||||
fun main() {
|
||||
val intProp = IntPropKey()
|
||||
val defn = transitionDefinition {
|
||||
transition(1, 2) {
|
||||
intProp using tween {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TransitionDefinition<kotlin.Int>")!>defn<!>
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ T> transitionDefinition(/*0*/ @kotlin.BuilderInference init: TransitionDefinition<T>.() -> kotlin.Unit): TransitionDefinition<T>
|
||||
|
||||
public abstract class AnimationBuilder</*0*/ T> {
|
||||
public constructor AnimationBuilder</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class AnimationVector {
|
||||
public constructor AnimationVector()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class AnimationVector1D : AnimationVector {
|
||||
public constructor AnimationVector1D()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class DurationBasedAnimationBuilder</*0*/ T> : AnimationBuilder<T> {
|
||||
public constructor DurationBasedAnimationBuilder</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class IntPropKey : PropKey<kotlin.Int, AnimationVector1D> {
|
||||
public constructor IntPropKey()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface PropKey</*0*/ T, /*1*/ V : AnimationVector> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class TransitionDefinition</*0*/ T> {
|
||||
public constructor TransitionDefinition</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final fun transition(/*0*/ fromState: T? = ..., /*1*/ toState: T? = ..., /*2*/ init: TransitionSpec<T>.() -> kotlin.Unit): kotlin.Unit
|
||||
}
|
||||
|
||||
public final class TransitionSpec</*0*/ S> {
|
||||
public constructor TransitionSpec</*0*/ S>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final fun </*0*/ T> tween(/*0*/ init: TweenBuilder<T>.() -> kotlin.Unit): DurationBasedAnimationBuilder<T>
|
||||
public final infix fun </*0*/ T, /*1*/ V : AnimationVector> PropKey<T, V>.using(/*0*/ builder: AnimationBuilder<T>): kotlin.Unit
|
||||
}
|
||||
|
||||
public final class TweenBuilder</*0*/ T> : DurationBasedAnimationBuilder<T> {
|
||||
public constructor TweenBuilder</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+5
@@ -2047,6 +2047,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38420.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt38667.kt")
|
||||
public void testKt38667() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38667.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedLambdaInferenceWithListMap.kt")
|
||||
public void testNestedLambdaInferenceWithListMap() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt");
|
||||
|
||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+5
@@ -2047,6 +2047,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38420.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt38667.kt")
|
||||
public void testKt38667() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38667.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedLambdaInferenceWithListMap.kt")
|
||||
public void testNestedLambdaInferenceWithListMap() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt");
|
||||
|
||||
Reference in New Issue
Block a user