[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,51 @@
package kt1977
//KT-1977 Wrong 'unused expression' in catch
fun strToInt(s : String) : Int? =
try {
Integer.parseInt(s)
} catch(e : NumberFormatException) {
null
}
//more tests
fun test1(s : String) : Int? {
return try {
88
Integer.parseInt(s)
22
}
catch (e: NumberFormatException) {
44
}
finally {
22
}
}
fun test2(s : String) : Int? {
return try {
88
Integer.parseInt(s)
22
} finally {
{
x : Int -> x
}
}
}
//KT-2015 False "Expression is unused" warnings
fun foo() {
val i : Int = try{
bar()
1
}
catch(e : Exception){
0
}
}
fun bar() {
}