It doesn't work if I start with a class declaratio...
# announcements
b
It doesn't work if I start with a class declaration. For example:
Copy code
class User(var username: String) {
    fun addFriend(friend: String) {}
}

val user = User("Bertrand")
with(user) {
    username = "Alice"
    addFriend("Bob")
}