KT-715. T.javaClass & TypeInfo.javaClassForType

This commit is contained in:
Alex Tkachman
2012-01-04 10:17:40 +02:00
parent c85be68047
commit b2593b268e
4 changed files with 30 additions and 0 deletions
@@ -0,0 +1,11 @@
val test = "lala".javaClass
val test2 = typeinfo<Int>().javaClassForType
fun box(): String {
if(test.getCanonicalName() != "java.lang.String") return "fail"
System.out?.println(test2.getCanonicalName())
if(test2.getCanonicalName() != "java.lang.Integer") return "fail"
return "OK"
}