You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'll be a little enhancement but so much pleasant one :)
Kotlin and Swift has something like Safe casting with as? operator. It gives an opportunity to casting with null fallback if cast can't be performed:
voidsomeFunction(dynamic arg) {
// we could has something likefinal classVariable = (arg as?SomeClass)?.someValue;
// in place offinal classVariable = arg isSomeClass? arg.someValue :null;
}
The text was updated successfully, but these errors were encountered:
It'll be a little enhancement but so much pleasant one :)
Kotlin and Swift has something like Safe casting with
as?
operator. It gives an opportunity to casting withnull
fallback if cast can't be performed:The text was updated successfully, but these errors were encountered: