Add tests for obsolete issues
#KT-38804 Obsolete #KT-38801 Obsolete #KT-38835 Obsolete #KT-38737 Obsolete #KT-38664 Obsolete #KT-38549 Obsolete #KT-38766 Obsolete #KT-38714 Obsolete
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
// FIR_IDENTICAL
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
inline fun <reified T, R> emptyFlow(crossinline transform: suspend (Array<T>) -> R): Flow1<R> =
|
||||
flow1 { emit(transform(emptyArray())) }
|
||||
|
||||
inline fun <reified T, R> emptyFlow(crossinline transform: (Array<T>) -> R): Flow1<R> =
|
||||
flowOf1(transform(emptyArray()))
|
||||
|
||||
fun <T> flowOf1(value: T): Flow1<T> = TODO()
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> flow1(@BuilderInference block: suspend FlowCollector1<T>.() -> Unit): Flow1<T> = TODO()
|
||||
|
||||
interface FlowCollector1<in T> {
|
||||
suspend fun emit(value: T)
|
||||
}
|
||||
|
||||
interface Flow1<out T>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
public inline fun </*0*/ reified T, /*1*/ R> emptyFlow(/*0*/ crossinline transform: (kotlin.Array<T>) -> R): Flow1<R>
|
||||
public inline fun </*0*/ reified T, /*1*/ R> emptyFlow(/*0*/ crossinline transform: suspend (kotlin.Array<T>) -> R): Flow1<R>
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ T> flow1(/*0*/ @kotlin.BuilderInference block: suspend FlowCollector1<T>.() -> kotlin.Unit): Flow1<T>
|
||||
public fun </*0*/ T> flowOf1(/*0*/ value: T): Flow1<T>
|
||||
|
||||
public interface Flow1</*0*/ out 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 interface FlowCollector1</*0*/ in T> {
|
||||
public abstract suspend fun emit(/*0*/ value: T): kotlin.Unit
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
private const val dateRangeStart: String = "2020-01-01"
|
||||
private const val dateRangeEnd: String = "2020-05-01"
|
||||
|
||||
private fun String?.toIconList(): List<String> = when (this) {
|
||||
null -> listOf("DATE_IS_NULL")
|
||||
<!INAPPLICABLE_CANDIDATE!>in<!> dateRangeStart..dateRangeEnd -> emptyList()
|
||||
else -> listOf("DATE_IS_OUT_OF_RANGE")
|
||||
}
|
||||
|
||||
fun main() {
|
||||
println("2019-12-31".toIconList())
|
||||
println(null.toIconList())
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
private const val dateRangeStart: String = "2020-01-01"
|
||||
private const val dateRangeEnd: String = "2020-05-01"
|
||||
|
||||
private fun String?.toIconList(): List<String> = when (this) {
|
||||
null -> listOf("DATE_IS_NULL")
|
||||
in dateRangeStart..dateRangeEnd -> emptyList()
|
||||
else -> listOf("DATE_IS_OUT_OF_RANGE")
|
||||
}
|
||||
|
||||
fun main() {
|
||||
println("2019-12-31".toIconList())
|
||||
println(null.toIconList())
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package
|
||||
|
||||
private const val dateRangeEnd: kotlin.String = "2020-05-01"
|
||||
private const val dateRangeStart: kotlin.String = "2020-01-01"
|
||||
public fun main(): kotlin.Unit
|
||||
private fun kotlin.String?.toIconList(): kotlin.collections.List<kotlin.String>
|
||||
@@ -0,0 +1,17 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
open class A {
|
||||
open val servers: List<C>
|
||||
get() = findAndExpand({ "hi" })
|
||||
.mapNotNull { B.foo(it) }
|
||||
|
||||
fun findAndExpand(vararg path: () -> String): List<String> = TODO()
|
||||
}
|
||||
|
||||
object B {
|
||||
inline fun <reified T : C> foo(bar: String?): T? = TODO()
|
||||
}
|
||||
|
||||
open class C
|
||||
class D : C()
|
||||
@@ -0,0 +1,32 @@
|
||||
package
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open val servers: kotlin.collections.List<C>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun findAndExpand(/*0*/ vararg path: () -> kotlin.String /*kotlin.Array<out () -> kotlin.String>*/): kotlin.collections.List<kotlin.String>
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object B {
|
||||
private constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final inline fun </*0*/ reified T : C> foo(/*0*/ bar: kotlin.String?): T?
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class C {
|
||||
public constructor C()
|
||||
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 D : C {
|
||||
public constructor D()
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user