Is this just a limitation of smart casts? ``` inl...
# announcements
a
Is this just a limitation of smart casts?
Copy code
inline fun Any?.notNull() = this != null

fun test(param1: String?, param2: String?) {
    if (param1.notNull() && param2 != null) {
        printString(param1) // does not compile, required String, found String?
        printString(param2)
    }
}

fun printString(string: String) {
}
👌 1