Merge remote branch 'origin/master'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
fun typeName(a: Any?) : String {
|
||||
return when(a) {
|
||||
is java.util.ArrayList<Int> => "array list"
|
||||
is java.util.ArrayList<*> => "array list"
|
||||
else => "no idea"
|
||||
}
|
||||
}
|
||||
@@ -8,4 +8,4 @@ fun typeName(a: Any?) : String {
|
||||
fun box() : String {
|
||||
if(typeName(java.util.ArrayList<Int> ()) != "array list") return "array list failed"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ fun t3() {
|
||||
|
||||
fun t4() {
|
||||
val e: E? = E()
|
||||
System.out?.println(e?.foo() == e) //verify error
|
||||
System.out?.println(e?.bar() == e) //verify error
|
||||
System.out?.println(e?.foo()) //verify error
|
||||
}
|
||||
|
||||
@@ -35,4 +35,5 @@ class C(val x: Int)
|
||||
class D(val s: String)
|
||||
class E() {
|
||||
fun foo() = 1
|
||||
fun bar() = this
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user