Closed jefferyharrell closed 5 years ago
Thanks for the bug report. This has in a sense been fixed. I accidentally released a new version of the language server that displayed the type diagnostics. Currently the type system is still mostly a prototype that I'm incrementally improving.
Under the hood I believe kOS calls toString on each key. Every structure has the to string method, but since a number isn't a subclass of string, my current type checking cannot determine that it will be properly coerced into a string. I just released v0.8.1 which disables the type checking diagnostics until it's more consistently correct.
I believe this is also the case for #82
Very good, sir. Thank you for all your efforts.
Fixed with version 0.10.0
The following code snippet...
Results in a warning from the language server:
Unless this is an upcoming change in kOS or something, this is not correct. For one thing, the program runs as expected. For another, the kOS docs say:
(https://ksp-kos.github.io/KOS/structures/collections/lexicon.html)