mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 08:31:38 +00:00
Before this commit we considered !isOverride as a sign that function / field / accessor has no overridden symbols. However, it's false for deserialized, because isOverride is always false there. This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
36 lines
770 B
Kotlin
Vendored
36 lines
770 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// WITH_RUNTIME
|
|
// KJS_WITH_FULL_RUNTIME
|
|
|
|
fun box(): String {
|
|
testForInUIntArrayWithUpcactToAny()
|
|
testForInUIntArrayWithUpcactToComparable()
|
|
|
|
return "OK"
|
|
}
|
|
|
|
fun testForInUIntArrayWithUpcactToAny() {
|
|
var test = ""
|
|
for (x: Any in uintArrayOf(1u, 2u, 3u)) {
|
|
test = "$test$x;"
|
|
useUIntAsAny(x)
|
|
}
|
|
if (test != "1;2;3;") throw AssertionError(test)
|
|
}
|
|
|
|
fun testForInUIntArrayWithUpcactToComparable() {
|
|
var test = ""
|
|
for (x: Comparable<*> in uintArrayOf(1u, 2u, 3u)) {
|
|
test = "$test$x;"
|
|
useUIntAsComparable(x)
|
|
}
|
|
if (test != "1;2;3;") throw AssertionError(test)
|
|
}
|
|
|
|
fun useUIntAsAny(a: Any) {
|
|
a as UInt
|
|
}
|
|
|
|
fun useUIntAsComparable(a: Comparable<*>) {
|
|
a as Comparable<*>
|
|
} |