functional list benchmark and part of rewrite of type info codegen for performance reasons
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
class A() {}
|
||||
|
||||
open class B<T>() {
|
||||
fun isT (a : Any?) : Boolean {
|
||||
return a is T
|
||||
@@ -167,7 +168,6 @@ fun t26 () : Boolean {
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
/*
|
||||
if(!t1()) {
|
||||
return "t1 failed"
|
||||
}
|
||||
@@ -243,7 +243,6 @@ fun box() : String {
|
||||
if(!t25()) {
|
||||
return "t25 failed"
|
||||
}
|
||||
*/
|
||||
if(!t26()) {
|
||||
return "t26 failed"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
class A() {
|
||||
var x : Int = 0
|
||||
|
||||
var z = { () =>
|
||||
x++
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
val a = A()
|
||||
a.z() //problem is here
|
||||
return if (a.x == 1) "OK" else "fail"
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
open class A<T> () {
|
||||
open class A<out T> () {
|
||||
fun plus(e: T) = B<T> (e)
|
||||
}
|
||||
|
||||
@@ -6,4 +6,6 @@ class B<T> (val e: T) : A<T>() {
|
||||
fun add() = B<T> (e)
|
||||
}
|
||||
|
||||
fun box() = if( A<String>().plus("239").add().e == "239" ) "OK" else "fail"
|
||||
fun box() : String {
|
||||
return if(A<String>().plus("239").add().e == "239" ) "OK" else "fail"
|
||||
}
|
||||
@@ -4,7 +4,6 @@ class Box<T>() {
|
||||
}
|
||||
|
||||
class Inner2() : Inner() {
|
||||
|
||||
}
|
||||
|
||||
fun inner() = Inner2()
|
||||
|
||||
Reference in New Issue
Block a user