JS: decomposition of invocation/"new"

This commit is contained in:
Alexey Tsvetkov
2015-04-10 18:04:00 +03:00
parent b7e26c3bf7
commit 92942fd1c5
8 changed files with 190 additions and 0 deletions
@@ -0,0 +1,26 @@
package foo
// CHECK_NOT_CALLED: buzz
private var LOG = ""
fun log(string: String) {
LOG += "$string;"
}
fun pullLog(): String {
val string = LOG
LOG = ""
return string
}
fun fizz<T>(x: T): T {
log("fizz($x)")
return x
}
inline
fun buzz<T>(x: T): T {
log("buzz($x)")
return x
}