8000 [BUG]: Unable to get Tuple values · Issue #841 · modular/modular · GitHub
[go: up one dir, main page]

Skip to content
[BUG]: Unable to get Tuple values #841
@cheburakshu

Description

@cheburakshu

Bug description

for i in range(len(b)):
    print(i)

Prints:

0
1

Trying to get the values per doc: https://docs.modular.com/mojo/stdlib/builtin/tuple.html#get

for i in range(len(b)):    
    print(b.get[i, Int32]())

Error:

error: Expression [61]:20:21: cannot use a dynamic value in call parameter
        print(b.get[i, Int32]())
                    ^

expression failed to parse (no further compiler diagnostics)

Steps to reproduce

  • Include relevant code snippet or link to code that did not work as expected.
  • If applicable, add screenshots to help explain the problem.
  • If using the Playground, name the pre-existing notebook that failed and the steps that led to failure.
  • Include anything else that might help us debug the issue.

System information

- What OS did you do install Mojo on ?
- Provide version information for Mojo by pasting the output of `mojo -v`
- Provide Modular CLI version by pasting the output of `modular -v`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmojoIssues that are related to mojomojo-langTag for all issues related to language.mojo-repoTag all issues with this label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0