use hard-coded TypeInfo instances for primitive types
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class Box<T>(t: T) {
|
||||
var value = t
|
||||
}
|
||||
|
||||
fun isIntBox(box: Box<out Any?>): Boolean {
|
||||
return box is Box<Int>;
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
val box = Box<Int>(1)
|
||||
return if (isIntBox(box)) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user