Add tests for obsolete issues

#KT-38092 Obsolete
 #KT-38179 Obsolete
 #KT-35105 Obsolete
 #KT-36696 Obsolete
 #KT-36947 Obsolete
 #KT-37337 Obsolete
 #KT-37309 Obsolete
 #KT-37727 Obsolete
 #KT-37735 Obsolete
 #KT-37853 Obsolete
 #KT-37920 Obsolete
 #KT-37709 Obsolete
 #KT-37706 Obsolete
This commit is contained in:
Mikhail Zarechenskiy
2020-04-20 00:18:16 +03:00
parent 57597f5900
commit befa1e114c
36 changed files with 559 additions and 0 deletions
@@ -0,0 +1,21 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KClass
import kotlin.reflect.KMutableProperty1
class Testclass {
var entry: String = ""
fun <T : Any> distinct(distinctField: KMutableProperty1<out Any, T>, entryClazz: KClass<T>, vararg filter: String) {
return
}
inline fun <reified T : Any> distinct(distinctField: KMutableProperty1<out Any, T>, vararg filter: String) {
return distinct(distinctField, T::class, *filter)
}
fun test() {
distinct(Testclass::entry, "filter")
}
}
@@ -0,0 +1,12 @@
package
public final class Testclass {
public constructor Testclass()
public final var entry: kotlin.String
public final inline fun </*0*/ reified T : kotlin.Any> distinct(/*0*/ distinctField: kotlin.reflect.KMutableProperty1<out kotlin.Any, T>, /*1*/ vararg filter: kotlin.String /*kotlin.Array<out kotlin.String>*/): kotlin.Unit
public final fun </*0*/ T : kotlin.Any> distinct(/*0*/ distinctField: kotlin.reflect.KMutableProperty1<out kotlin.Any, T>, /*1*/ entryClazz: kotlin.reflect.KClass<T>, /*2*/ vararg filter: kotlin.String /*kotlin.Array<out kotlin.String>*/): 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 final fun test(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -0,0 +1,13 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
fun test() {
val bug = storing { "" }.default(null)
}
class Bar<out T>
fun <T> Bar<T>.default(defaultValue: T): Bar<T> = TODO()
fun <T> Bar<T>.default(defaultValue: () -> T): Bar<T> = TODO()
fun <T> storing(transform: String.() -> T): Bar<T> = TODO()
@@ -0,0 +1,13 @@
package
public fun </*0*/ T> storing(/*0*/ transform: kotlin.String.() -> T): Bar<T>
public fun test(): kotlin.Unit
public fun </*0*/ T> Bar<T>.default(/*0*/ defaultValue: () -> T): Bar<T>
public fun </*0*/ T> Bar<T>.default(/*0*/ defaultValue: T): Bar<T>
public final class Bar</*0*/ out T> {
public constructor Bar</*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
}
+28
View File
@@ -0,0 +1,28 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_VARIABLE
// FILE: A.java
public class A {
public static <T, E extends Throwable> T compute(ThrowableComputable<T, E> action) throws E {
return (T) action;
}
}
// FILE: ThrowableComputable.java
public interface ThrowableComputable<T, E extends Throwable> {
T compute() throws E;
}
// FILE: test.kt
fun main() {
val headers = A.compute(
ThrowableComputable {
getCollection()
}
)
}
fun getCollection(): Collection<Int> = TODO()
+21
View File
@@ -0,0 +1,21 @@
package
public fun getCollection(): kotlin.collections.Collection<kotlin.Int>
public fun main(): kotlin.Unit
public open class A {
public constructor A()
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
// Static members
public open fun </*0*/ T : kotlin.Any!, /*1*/ E : kotlin.Throwable!> compute(/*0*/ action: ThrowableComputable<T!, E!>!): T!
}
public interface ThrowableComputable</*0*/ T : kotlin.Any!, /*1*/ E : kotlin.Throwable!> {
public abstract fun compute(): 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
}