-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
Merging array types with different element types, for example `[Lj/l/String;` and `[Lj/l/Object;`, now produces `[Lj/l/Object;` (instead of `Lj/l/Object;`), which allows for more precise tracking of null values because we assume that AALOAD on a non-array typed value is possible only if that value is null. #KT-54802 Fixed
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class K { | ||
val x: String = "OK" | ||
} | ||
|
||
inline fun <T> Array<out T>.ifEmpty(body: () -> Array<out T>): Array<out T> = | ||
if (size == 0) body() else this | ||
|
||
inline fun <T> Array<out T>.f(p: (T) -> String): String = | ||
p(this[0]) | ||
|
||
fun box(): String = | ||
emptyArray<K>() | ||
.ifEmpty { arrayOf(K()) } | ||
.f(K::x) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.