KJS: introduce new base class WebDemoExamples* tests

This commit is contained in:
Zalim Bashorov
2017-04-20 20:39:56 +03:00
parent e1cf6445ee
commit 25dd31a2e0
32 changed files with 118 additions and 563 deletions
+10
View File
@@ -0,0 +1,10 @@
fun main(args: Array<String>) {
println(getStringLength("aaa"))
println(getStringLength(1))
}
fun getStringLength(obj: Any): Int? {
if (obj is String)
return obj.length // no cast to String is needed
return null
}