Drop Throwable#printStackTrace, make it a JVM-specific extension

This commit is contained in:
Alexander Udalov
2015-12-24 03:53:27 +03:00
parent 3d44471659
commit 75f046fa81
14 changed files with 14 additions and 27 deletions
+3 -3
View File
@@ -41,10 +41,10 @@ public class SomeClass() {
}
}
public fun box():String {
public fun box(): String {
var obj = SomeClass()
return if(obj.status == null) "OK" else {
obj.status?.printStackTrace()
return if (obj.status == null) "OK" else {
(obj.status as java.lang.Throwable).printStackTrace()
"failed"
}
}