-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added len()
function
#147
Added len()
function
#147
Conversation
Closes #120 Now all objects that have __len__() defined can be called with len(), even with classes! ``` class Test { fun __constructor__(){}; fun __len__() { return 10 } } len(Test()) # 10 len("test") # 4 len([1,2,3]) # 3 ```
feat: added length support in Boolean, HashMap. fix: type annotations.
… into len-function
Some issue is raising at tests/in-op.rn L61 |
The problem seems to be when |
@angelcaru Can you check this issue? |
I think this feature is complete now. We will fix the test later with another PR. |
Closes #120
Now all objects that have len() defined can be called with len(), even with classes!