Files
kotlin/compiler/testData/codegen/box/objects/kt535.kt
Ilya Matveev a5e4e0284e Mute some box tests for native backend
This patch mutes the following test categories:
   * Tests with java dependencies (System class,
     java stdlib, jvm-oriented annotations etc).
   * Coroutines tests.
   * Reflection tests.
   * Tests with an inheritance from the standard
     collections.
2017-03-10 19:59:37 +03:00

25 lines
583 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
class Identifier<T>(t : T?, myHasDollar : Boolean) {
private val myT : T?
public fun getName() : T? { return myT }
companion object {
open public fun <T> init(name : T?) : Identifier<T> {
val id = Identifier<T>(name, false)
return id
}
}
init {
myT = t
}
}
fun box() : String {
var i3 : Identifier<String?>? = Identifier.init<String?>("name")
System.out?.println(i3?.getName())
return "OK"
}