Skip to content
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

[BUG] Cannot access list element by index #89

Closed
sa- opened this issue May 10, 2023 · 1 comment
Closed

[BUG] Cannot access list element by index #89

sa- opened this issue May 10, 2023 · 1 comment
Labels
bug Something isn't working mojo-repo Tag all issues with this label

Comments

@sa-
Copy link
Contributor

sa- commented May 10, 2023

Bug Description

bool_list = [True, False, True, True]
bool_list[0]

Causes an error

error: Expression [50]:21:14: 'ListLiteral[[!kgen.declref<_"$Bool"::_Bool>, !kgen.declref<_"$Bool"::_Bool>, !kgen.declref<_"$Bool"::_Bool>, !kgen.declref<_"$Bool"::_Bool>]]' is not subscriptable, it does not implement the `__getitem__`/`__setitem__` methods
    bool_list[0]
    ~~~~~~~~~^

It should evaluate to True

Steps to Reproduce

see above

Context

@Mogball
Copy link

Mogball commented May 11, 2023

Closing in favour of #100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

3 participants