Sobes.tech
Back to tasks
Junior — Senior
104

Вызов расширения у переменной, содержащей null

Companies where asked:
amoCRMamoCRM

Task condition

livecode

Выполнится ли приведённый код без исключений? Если да, какое сообщение появится в консоли?

class Example

fun Example?.doSomething() {
    println("Hello world")
}

fun main() {
    var sample: Example? = null
    sample.doSomething()
}