Open XmiliaH opened 3 years ago
Hi, The types that can be used in annotations are described here: https://the-ravi-programming-language.readthedocs.io/en/latest/ravi-reference.html
boolean is not defined - hence it is assumed that this is a userdata type
I guess that I intended to add it but didn't - we can either remove it as a recognized type or add support for it.
Removing it is quite easy I think as the only place it is recognized is in the parser.
Both, fully implementing or removing it could break existing code.
I am going to remove it from being recognized the parser for now.
I also made some success of re-implementing boolean
type.
You can see proposed solution #223
Boolean variables seem to only be implemented half. They can be declared with
local b:boolean
but@boolean(b)
casts b to ausertype
with metatableboolean
. Furthermore,local b:boolean = tostring(1)
will error butlocal b:boolean; b = tostring(1)
will not error at compile nor runtime.What is the expected behavior of boolean variables?