generate !! if the postfix operator is nullable
This commit is contained in:
committed by
Pavel V. Talanov
parent
d4c7b7b2b7
commit
07fcfe3b42
@@ -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()!!)
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user