generate !! if the postfix operator is nullable

This commit is contained in:
Dmitry Jemerov
2012-05-25 20:45:55 +02:00
committed by Pavel V. Talanov
parent d4c7b7b2b7
commit 07fcfe3b42
11 changed files with 36 additions and 131 deletions
@@ -3,7 +3,7 @@ import java.io.File
public open class Test() {
class object {
public open fun isDir(parent : File?) : Boolean {
if (parent == null || !parent?.exists())
if (parent == null || !parent?.exists()!!)
{
return false
}
@@ -0,0 +1,2 @@
String s = null;
if (!s.isEmpty()) { }
@@ -0,0 +1,4 @@
var s : String? = null
if (!s?.isEmpty()!!)
{
}