Add tests for obsolete issues
(Test for KT-37331 is added to multiplatform/defaultArguments/suspend.kt.) #KT-30080 #KT-33641 #KT-36237 #KT-36952 #KT-37331 #KT-38920 #KT-39256 #KT-42415 #KT-44636 #KT-45704 #KT-47084 #KT-47894
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
inline fun <reified P> cast(value: Any): P =
|
||||
cast0<Int, P>(value)
|
||||
|
||||
inline fun <reified P, reified Z> cast0(
|
||||
value: Any,
|
||||
func: (Any) -> Z = { it as Z }
|
||||
): Z = func(value)
|
||||
|
||||
fun box(): String =
|
||||
cast<String>("OK")
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
interface I
|
||||
class C<T>
|
||||
|
||||
private inline fun <reified T> C<T>.f() = object : I {
|
||||
val unused = T::class
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val t1 = C<String>().f()
|
||||
val t2 = C<String>().f()
|
||||
arrayOf(t1, t2)
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user