Introduce 'reified' instead of 'erased'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
fun <erased T : Any> T?.iterator() = object {
|
||||
fun <T : Any> T?.iterator() = object {
|
||||
var hasNext = this@iterator != null
|
||||
private set
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
fun box() = if(arrayOfNulls<Int>(10) is Array<java.lang.Integer>) "OK" else "fail"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ class Box<T>(t: T) {
|
||||
}
|
||||
|
||||
fun isIntBox(box: Box<out Any?>): Boolean {
|
||||
return box is Box<Int>;
|
||||
return box is Box<*>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user