lewik
11/26/2017, 3:42 PMid_qzvhcz$_0
in most cases automatically?snrostov
11/26/2017, 4:06 PMfun print(user: User) { ... }
fun print(group: Group) { ... }
@JsName("print")
fun print(a: Any?) {
when (a) {
is User -> print(a)
is Group -> print(a)
else -> error("None of the functions can be called with the arguments supplied")
}
}
For now we are writing this functions by hand (required for js api).