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:
Mikhail Zarechenskiy
2020-08-11 10:11:47 +03:00
parent 7f4df19dd1
commit 2e131b870a
30 changed files with 503 additions and 0 deletions
@@ -0,0 +1,14 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Inv<T>
fun <T> foo(f: () -> T): Inv<T> = TODO()
fun myExit(): Nothing = TODO()
fun test(x: String?): Inv<String> {
return foo {
if (x == null) myExit()
x
}
}
@@ -0,0 +1,14 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Inv<T>
fun <T> foo(f: () -> T): Inv<T> = TODO()
fun myExit(): Nothing = TODO()
fun test(x: String?): Inv<String> {
return foo {
if (x == null) myExit()
<!DEBUG_INFO_SMARTCAST!>x<!>
}
}
@@ -0,0 +1,12 @@
package
public fun </*0*/ T> foo(/*0*/ f: () -> T): Inv<T>
public fun myExit(): kotlin.Nothing
public fun test(/*0*/ x: kotlin.String?): Inv<kotlin.String>
public final class Inv</*0*/ T> {
public constructor Inv</*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
}