Basic class members generation.

Split testData into 'classes' and 'expressions'.
This commit is contained in:
Dmitry Petrov
2016-08-25 18:42:24 +03:00
committed by Dmitry Petrov
parent 703d3405ed
commit 0b647ac358
102 changed files with 356 additions and 244 deletions
+23
View File
@@ -0,0 +1,23 @@
fun expectsString(s: String) {}
fun expectsInt(i: Int) {}
fun overloaded(s: String) = s
fun overloaded(x: Any) = x
fun test1(x: Any) {
if (x !is String) return
println(x.length)
expectsString(x)
expectsInt(x.length)
expectsString(overloaded(x))
}
fun test2(x: Any): String {
if (x !is String) return ""
return overloaded(x)
}
fun test3(x: Any): String {
if (x !is String) return ""
return x
}