Merge remote branch 'origin/master'
This commit is contained in:
@@ -3,7 +3,7 @@ class Outer() {
|
||||
val outer: Outer get() = this@Outer
|
||||
}
|
||||
|
||||
public val x = Inner()
|
||||
public val x : Inner = Inner()
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
open class Base() {
|
||||
public val plain = 239
|
||||
val plain = 239
|
||||
public val read : Int
|
||||
get() = 239
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Outer() {
|
||||
public val s = "xyzzy"
|
||||
val s = "xyzzy"
|
||||
|
||||
open class InnerBase(public val name: String) {
|
||||
}
|
||||
@@ -7,7 +7,7 @@ class Outer() {
|
||||
class InnerDerived(): InnerBase(s) {
|
||||
}
|
||||
|
||||
public val x = InnerDerived()
|
||||
val x = InnerDerived()
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
fun launch(f : fun() : Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val list = ArrayList<Int>()
|
||||
val foo : fun() : Unit = {
|
||||
list.add(2) //first exception
|
||||
}
|
||||
foo()
|
||||
|
||||
launch({
|
||||
list.add(3)
|
||||
})
|
||||
|
||||
val bar = {
|
||||
val x = 1 //second exception
|
||||
}
|
||||
bar()
|
||||
|
||||
return if (list.size() == 2 && list.get(0) == 2 && list.get(1) == 3) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user