Provide replacement for methods deprecated in favor of SAM-constructors.

Provide replacement for isNotEmpty on nullable receiver.
JS: Provide SAM-like constructor for Runnable.
This commit is contained in:
Ilya Gorbunov
2015-06-03 19:41:03 +03:00
parent 13c89b7ae9
commit 705c9089f0
4 changed files with 9 additions and 15 deletions
+4
View File
@@ -29,6 +29,10 @@ public trait Runnable {
public open fun run() : Unit;
}
public fun Runnable(action: () -> Unit): Runnable = object : Runnable {
override fun run() = action()
}
library
public trait Appendable {
public open fun append(csq: CharSequence?): Appendable