Add regression tests for obsolete issues

#KT-9304
 #KT-14961
 #KT-16549
 #KT-21080
 #KT-28234
 #KT-30102
 #KT-31994
 #KT-34291
 #KT-38099
 #KT-41174
 #KT-44622
 #KT-44701
 #KT-44781
 #KT-44849
 #KT-44978
 #KT-45081
 #KT-45286
 #KT-45383
 #KT-45444
 #KT-45907
This commit is contained in:
Alexander Udalov
2021-02-11 14:51:55 +01:00
parent 2666a93e6a
commit 21e9bd7ea2
41 changed files with 1150 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
// IGNORE_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
fun box(): String =
testBug(null)
fun testBug(test: Test?): String =
test?.Inner()?.thing ?: "OK"
class Test(val name: String) {
inner class Inner {
val thing: String
get() = name
}
}
@@ -0,0 +1,7 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM
// WITH_RUNTIME
inline class Location @JvmOverloads constructor(val value: String? = "OK")
fun box(): String = Location().value!!
+14
View File
@@ -0,0 +1,14 @@
// IGNORE_BACKEND: JVM
// WITH_RUNTIME
inline class StringArray(val values: Array<String>)
fun foo(a1: StringArray, a2: StringArray): String {
var result = ""
for ((_, a) in arrayOf(a1, a2).withIndex()) {
result += a.values[0]
}
return result
}
fun box(): String = foo(StringArray(arrayOf("O")), StringArray(arrayOf("K")))