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
I wouldn't say that this is a bug, but an unexpected behaviour I have come across:
let x = "test"; x?.[0:1]
Returns "t", as expected.
let x = nil; x?.[0:1]
Returns "error cannot slice unknown (1:17)". I expected nil.
Possibly the first expression is misuse of the langauge and should not be allowed. But if it is to be allowed, then I think the consistent result of the second expression should be nil.