-
-
Notifications
You must be signed in to change notification settings - Fork 464
Open
Description
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.
antonmedv