@LAZYGLOBAL OFF.
DECLARE LOCAL foo IS LEXICON().
SET foo["bar"] TO LEXICON().
SET foo["bar"]["baz"] TO "hello".
PRINT(foo["bar"]["baz"]).
...is valid and works, but the language server puts a warning under the second open bracket in the expression foo["bar"]["baz"], saying
Can only index a list, lexicon or string
In this case, foo["bar"] is itself a lexicon, so the syntax foo["bar"]["baz"] is totally valid. I think the language server isn't noticing that foo["bar"] has been declared and initialized as an empty lexicon.
I can imagine that this one might be a real challenge to resolve. Let me note that it's not a serious problem since the warnings are only visible if I mouse-over them. On the other hand, spurious warnings make it a little harder to spot legit ones, so I thought I'd report it just in case.
...is valid and works, but the language server puts a warning under the second open bracket in the expression
foo["bar"]["baz"]
, sayingIn this case,
foo["bar"]
is itself a lexicon, so the syntaxfoo["bar"]["baz"]
is totally valid. I think the language server isn't noticing thatfoo["bar"]
has been declared and initialized as an empty lexicon.I can imagine that this one might be a real challenge to resolve. Let me note that it's not a serious problem since the warnings are only visible if I mouse-over them. On the other hand, spurious warnings make it a little harder to spot legit ones, so I thought I'd report it just in case.