tests: Update box tests (1050294:id)
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
|
||||
class Generic<P : Any>(val p: P)
|
||||
|
||||
class Host {
|
||||
fun t() {}
|
||||
val v = "OK"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
Generic(Host()).p::class
|
||||
(Generic(Host()).p::t)()
|
||||
return (Generic(Host()).p::v)()
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
class B
|
||||
|
||||
fun B.magic() {
|
||||
}
|
||||
|
||||
fun boom(a: Any) {
|
||||
when (a) {
|
||||
is B -> run(a::magic)
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
boom(B())
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
fun box(): String {
|
||||
fun bar() {}
|
||||
fun baz() {}
|
||||
|
||||
if (!::bar.equals(::bar)) return "Fail 1"
|
||||
if (::bar.hashCode() != ::bar.hashCode()) return "Fail 2"
|
||||
|
||||
if (::bar == ::baz) return "Fail 3"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user